A few fixes for escaping quotes and escape characters.