Fixing JS encoding of " and \

Thanks @michaelficarra
Encode all JS character escape sequences

Thanks once again to @michaelficarra
Merge pull request #330 from garyb/unicode-in-strings

Fix other escape sequences