Fix test so it doesn't try to write out temporary files into the test tree.