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 
Indentation of new files should match the indentation of the project. (This file appears to use tabs, but the project uses spaces.)