Add hg2git.py with library routines