Adding support for error messages from MathJax to TeXEngine class.
Fixing bug in handling of apostrophes in input.  (They were incorrectly escaped.)