fixes to make it work on Rails 3.2

hi, I made a couple of modifications for it to work on my Rails 3.2 app, following this http://stackoverflow.com/questions/2982677/ruby-1-9-invalid-byte-sequence-in-utf-8

by the way, I have a small question, would it be possible to add support to chains like this one as well?:

t(‘.title’)

Thank you very much!