Better debug and exception handling

With this commit:
* `--debug` switch now turns on Python's `__debug__` constant,
* ˙sys.excepthook˙ (default exception handler) is replaced by a
  function that prints a traceback as well as issues a Python
  debugger if `__debug__`, so the programmer can interactively
  inspect the error,
* a couple of pointless try-except blocks are now unindented (with
  potential programmers' errors handled by said excepthook).