Simpler tox setup.
Refactor into smaller parts.
Cleaner context generation loop.
Better test of unicode_open().
Fix main entry point for script.
Safer use of open() as context manager.
Use argparse to get required input/output dirs and optional port.