will succeed even if the file already exists, there is a race condition in which an attacker
can create the target file before line 2 is executed. The target filename could be a
symbolic link that points to a file that is owned by the victim who is executing the code.
The timing window is probably large, because there is no check to see if $tmp exists