refactor main.py, flesh out functions from main function

@stdweird, @wpoely86: please review?

The diff is going to look a bit messy, maybe you want to look at the actual new `main.py` instead...
they were used in `obtain_path` in this module, but after moving the use of the `print_x` functions to `main.py`, I was able to simply trash `obtain_paths` and use `obtain_ec_for` directly from (a function in) `main.py`