Moved from `temporary` to `tmp` to stop creation of excess tempfiles

As reported in #5, it looks like we are creating unnecessary temporary files. In this PR:

- Add regression test for excess temporary files
- Move from `temporary` to `tmp` which allows for getting filepath without file creation

Fixes #5.

/cc @mlmorg @Raynos