mktemp
The GNU and BSD implementations differ on several points, this commit hopefully finds a middle ground.