Changed the use of tmpnam to mkstemp