Per #2397 the file cache now uses a filesystem safe key.

Issue #2397 describes a security bug because of unsafe characters being allowed to be written to the filesystem.