Closing the stale handle that returns mkstemp