Get travis passing on jruby 1.8 and 1.9

Had to use open() instead of IO.read so that I could pass
the binary flag.
Merge pull request #1134 from atambo/jruby_on_travis

Get travis passing on jruby 1.8 and 1.9