update to latest util module code

Add tests copied from node. Also run tests in browser via zuul.