MODULES-780 Don't blow up on unicode characters.

Gotta love the difference between Ruby 1.8.7 not caring and every
subsequent version exploding.
Merge pull request #318 from daenney/unicode-fix

MODULES-780 Don't blow up on unicode characters.