Make the test sideeffect-free

Run the test in a separated directory. Now you can do your job in your
working directory while the test is running.