server: Moved the create_temp_file function to mapping.c.