Use _mktemp_s on win32, which is more secure than mktemp