Clean up test to avoid File.write when < 1.9