Make JUnitReporter compatible with Ruby < 1.9.3.

IO.write is a new method as of Ruby 1.9.3, so use File.open and << instead.
Merge pull request #48 from randycoulman/junit-reporter-compatibility

Make JUnitReporter compatible with Ruby < 1.9.3.