Reuse fd as returned by mkstemp