Ruby 2.0 encoding fixes.
Merge pull request #7 from ss/master

Ruby 2.0 encoding fixes.