fixes #411. bundling on server.js, monkeypatching fs to avoid EMFILE