Avoid writing files in tests.