Fix test to not write output to the test directory, as it may not be writable.