SETUP.py bug-fix

Last bugfix was erronous. Corrected the bug-fix as well as added more
exception handlers.
I also cleaned up the code, expanded comments and made the output to the
user more readable.