Improve packaging

* Mac package is now a proper app with a mac icon. This also
  means the application name is correct (for example in the menu).
* Uncaught exceptions are now caught in the main method and
  written to the log file.