make tmpdir configurable

Closes #180

Using `/tmp` is not recommended, but unfortunately there are no better recommendations so it's better to just make it tweakable.