Use System.IO.Temp instead of mkdtemp.