use a cleaner script for `main()` when installing with Python

We took care of all the `close()` calls for the script that gets distributed for distros, but not when installing via Python (which most/all of our tests use).

This PR creates a proper `bin/` directory and places the Python script there, removing the old `console_scripts` in favor of the new executable.