Escape quotes before passing to PhantomJS