Disk cache optimizations

Don't update modification date on accesses.
Clear out half the cache when capacity is reached.
Write files atomically