Fix test error in ruby 1.9.2

generator_spec overrides the class File with a version that doesn't have
the methods we need in some tests.