add encoding to latex_to_pdf to solve invalid ASCII errors for ruby 1.9
Merge pull request #38 from danniyu/encoding_issue

add encoding to latex_to_pdf to solve invalid ASCII errors for ruby 1.9
Use xelatex and Rails.logger
Refactoring
ensure thing-to-escape is actually a String