path: move the tmpname call into create_temp_file