Installer: Escape quotes and backslases in single-quoted strings

Fixes: I#29990
Merge branch '4.2/installer-escapes' into 4.2-trunk