Clean up main.py and move code to __main__.py and utils/main.py.
fix gui/portable for pull request #903
Reinsert --no-browser option. Move code to utils.main. Some other small style changes. Move get_default_local_path function to finish the gui stuff. Fix merge conflict misstake.