Close open file handle returned from mkstemp