You should use FakeFS instead of using temporary files/directories.  The tests will be faster w/o IO.