Fixes some UTF-8 ArgumentErrors I was getting with the regular expression in Ruby 1.9.3

The encoding cannot be guaranteed in the file source read in from
IO.foreach.