Fix for #14.  Use prepublish script to build 'lib'.  Add some unit test infrastructure.