Add file existence cache.

Solves #234