Escape quotes in error messages to avoid JSON parse errors

I think this will fix an issue we're having with error reporting: 

"{\"errorMessage\":\"Uncaught TypeError: Cannot read property"}