Use temporary directories for test output.