Created tmp_dir to allow custom temp directory. Shared web host with jailed access may not be able to execute scripts in /tmp directory.