fixing thrown exception when providing deprecated encoding

I haven't been able to find the encoding 'utf-8' anywhere in the documentation of node, but it seems like some of their methods (such as this one you are using, `Buffer.toString()`) do accept that as an encoding without throwing an exception. I have changed my code to use the encoding 'utf8' instead of 'utf-8', but all that does is prevent me from traveling this code path that had a bug in it.

So here's a fix for the bug, along with a test that causes that code path to be travelled. I also added some npm scripts so you can just do `npm test` to run your tests, and `npm run test-cov` to get a coverage report on the library.