fixed a HAVE_MKSTEMP issue so we guarantee no mktemp call only mkstemp call which is reasonable