Fix backslash bugs.

Normally escaped backslash at end of string causing issues.
Normally escaped backslash overlapping with a potentially escaped
character causing issues.
Potential issue with normally escaped backslash followed by quote