improve escapestring to handle all ascii characters