escape username for reverse lookup

Fixes tracebacks if username contains spaces