Fixed: do no create tmp dir if arguments are bad (and clean up)