Smaller rgen apps

Fixed rgen so it only escapes non-printable characters, and " and '.

This should result in smaller code files from rgen.