Using mkstemp() instead of mktemp() in tmpfile()