Clean up Imager file cache operations: only do so if requested, handle files better. Test this. Ensure that the config can be pickled with tests