Correct escaping of single- and double-quotes.

This fixes an issue that occured when the commit message/annotation
contains a double-quote.

For some reason the original code replaced a `'` with `'\''`.
the changed code replaces a `'` with `\'` and a `"` with `\"`.