Improve file mode.

- Remove tmp file on failed rename (prevent filling disk with tmp files)
- Support force revalidation via filesystem flag to prevent stampeding the cache