Fix unit test that were generated files not in a temp dir