Merge pull request #14 from maraoz/refactor/browser-build

modularize browser build.js
Merge pull request #15 from maraoz/refactor/browser-build

Refactor/browser build
Merge pull request #16 from maraoz/refactor/browser-build

add dir option