Change CacheFile to have an explicit install stage

I think it makes sense to make this stage explicit instead of hiding
it in the Close() method.

Eventually this will probably go into a wrapper layer that is part of
the Cache that takes care of recording the output file hash against
the config and input file.