read-cache.c: verify index file before we opportunistically update it