Exposed the _codes variable to help testing
Added coverage command (using istanbul) to package.json
Tests for Permission and the test helpers