Allow OSX to run tests with change to TMPDIR

Previously, the test suite could not run on OSX without either being `root` or adding `TMPDIR=/tmp` to the beginning of `./runtests.py`. This PR allows the test-suite to run without appending the TMPDIR variable change.