Fixed encoding bug

Fixed an encoding problem that I encountered when trying to use Ruby 1.9.1. 

Details documented at http://jeffwelling.github.io//2013/05/12/Fixing-rack-protection.html