Replace __dirnames with dots in require statements.

It works the same in node, but if you use the `__dirname` it doesn't work with browserify.