Support Ruby 1.8.7, but without supporting invalid characters

I haven't run into the issue that dcutting reported in Pull Request #11, but his fix breaks ocunit2junit on Ruby 1.8.7 (default version shipping with OS X)

A better solution would be to figure out how to support all Ruby versions, but this at least allows the script to run.