Provide a utility to create a temporary file in the specified directory.