Changed tmpname(2) to mkdtemp(1)
Use returned value for checking rather than template
Octal, bro!
Merge branch 'Hamcha-master'