Clean up tmp files used in tests for image retrieval function