Replaced die() and exit() statements with Exceptions

- Original library used die() and exit() as a sort of "error control". This practice is lazy at best, as such commands cannot be caught or handled. Replacing them with Exceptions will allow calling libraries to better handle errors.