Small cleanups to surrogateescape.py