Fix problems with fs and path in browser.