Fixed broken version checks, fixed tests.

This is a much more robust method of finding the default (latest) version for the nodewebkit package.