add tests for generating an image path in the temp directory