Patched a global leak and added jshint and mocha

This PR aims to resolve https://github.com/epha/rescode/issues/4

First commit adds `gulp-mocha` and `gulp-jshint`, as well as some basic unit testing.
For my own sanity, I needed some unit tests.

Second commit pulls out `GLOBAL.BWIPJS` and adds `require("../bwip.js");` where appropriate.