Add gulpfile build script

Some modifications to the main js file were also required in order to
make JSHint pass.
Merge pull request #1 from iampseudo/dev-build-script

Add Gulp support