Fixes #2 and #3.

Tests added to check the encoding of zeroes.

Cache object removed from encdec.js, to keep to the [Single Responsibility Principle](http://en.wikipedia.org/wiki/Single_responsibility_principle).

Other changes:

* Gruntfile.js and package.json added
* `tests` folder renamed to `test`