Make Unicode Optional and Make Exception a Real Exception

I'm trying to rewrite part of [jacobwg/shortly](https://github.com/jacobwg/shortly) using this class, and had to make a few changes.

Firstly, I've made unicode support optional as shortly needs to do Unicode pack/unpack at a different stage and doing it during base64 encode was breaking the app.  Thus, I added a second parameter to enable unicode support if it is needed.

Secondly, I made the InvalidCharacter error its own exception class.