Adding local version of miniterm.py to allow extension; adding support for escape.