Close the file handle returned from mkstemp