A new $tmp_dir option for handling '/tmp' with noexec, and a bug fix.

Hi,
Thanks for this repo.  I needed a couple of modifications to incorporate this at work.  Let me know if you need any more explanation.

Martyn