Fixing tests and test setup

Many tests were failing having never run on a *nix platform. These, and other test setup issues have been rectified so that are test build now passes.