cli.py: add a main function
cli.py: export unescape_py2 function