python-linkme-wrapper: optimize some escaping