Add dist/ to .gitignore
Work around browserify weirdness

Browserify does some seriously weird stuff with the require: at times,
the requires are replaced by require(<number>), which might be fine
itself, however if we then browserify it into another package, those
same requires cause an error since they aren't a string.
The uglify step prevents this by obfuscating the require.

The index redirection is required to prevent browserify from resolving
lib/jsdom.js recursively. browserify lib/jsdom.js redirects to
dist/jsdom.js, which is empty, which therefore creates an empty
browserified file.