Updating unit tests to be more concise, and to run on randomly generated data.
Fixing build scripts for new psake and nunit versions