Implemented filesystem cache, one and only (see #1415)

I think you should call `clearstatcache()` here, to clear out the stat cache if there is one