test for index stat caching.
bug: stat should only be called when index has no cached value.
Merge pull request #8 from cgc/stat-caching

Fix stat caching