Add tempfile for test output

For consistency - all files created by tests should be created in a temporary folder.
(This prevents the creation of the temporary file in the installdir, which is where the tests are run when building the fedora package - such files otherwise easily sneak into the package).