added File.write methods for specs with ruby 1.9.2