Use contextmanager to frob_tty

--HG--
extra : histedit_source : 81b96d95c65b47551c2708a8e7db1ba9644bf7d3
Importlib is nicer

--HG--
extra : histedit_source : 8cacad032bd3a993e1e779cbcea5435ea03aa5b2
Use argparse (handles positional arguments more elegantly)

--HG--
extra : histedit_source : a8348d87d18181ef4a71f41b1a72fccbb25e32ee