Use temp file to save metadata for readonly file

Looking at it yet again, the file which is returned by WithExtension is overwritten (so there is only ever one file created).  Thus, this is more efficient (since our method of not returning the file is to create it and delete it).  Additionally, this is safer because the file is there from the time of the call to WithExtension rather than a (miniscule) additional lag between name generation and final file generation.

So I think the current code (calling WithExtension) is the best.