Better error handling

Now featuring a little better error handling when openssl parameters are missing as suggested by Markus Manzke.

Also added a simple error_exit function that allows to echo helpful error messages when running verbose or in debug mode.