Move error handling into CLI class

Instead of handling errors, exit codes and other stuff like that all over the code, raise an exception and let the class which communicates with the user handle errors.

Additionally the `have_error_message` RSpec matcher was removed because it ended up being unused after some changes.