Make the cache file world writeable on first write.

This addresses an issue where the user that first wrote to this
file (during setup, perhaps) is not the same user that the
application later runs as.

The mode is only set during the first write.