Fix test with tempDir