add dir option
Merge pull request #16 from maraoz/refactor/browser-build

add dir option