WithFile looks (header, content) up in a user-specific file cache.
If found, it writes the file contents. Else it calls fn to write to
both the writer and the file system.
header and content are distinct parameters to relieve the caller from
having to concatenate them.