default worker option to './worker.js'. Allow worker to be provided via command-line as well if includes .js as extension.
moved master logic to its own file.