Escape quotes and matched backslashes in perl match results

When matching text containing backslashes, e.g. "\n", the "Group" output will display this as a newline. To prevent this, we have perl escape any backslashes in the group output so that 'read will handle the expression correctly.

Further, if the matched text contains double quotes, the resulting sexp printed by the perl program is invalid, and so the `*Groups*` buffer is empty. This commit also fixes this second issue.