Escape single quotes in strings to preserve round-tripping

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=956567
eg strings "don't" or 'don\'t' were coming out as 'don't'
which broke JS parsing. Now outputs as 'don\'t' correctly.