test and improve string and ident escaping