Js tests

this adds tests via nodeunit
wrap identifyHash in a closure and export it so it plays nice in node