hg-fast-import.py: Sanitize ref names