Add lib/bundle.js.

Command-line browserify mangles module names in weird ways on Windows,
so we'll just do everything in JS.
bundle w/ source maps if DEBUG is set.
fix broken tests on travis.