Adding unit tests and expanding API

 
* unminified code
* added unit tests
* added documentation
* expanded expiration api
* now setting a reasonable default value for path
* swapped out `decode` and `encode` for non-deprecated methods 
`throw`s should specify the error message to make sure you're testing for the correct error.