Fixing some test problems

I came across some problems with building and testing following the last PR. This one introduces some fixes - I still cannot run several of the tests, but it seems to be a local issue (see http://stackoverflow.com/questions/6176841/could-not-load-file-or-assembly-newtonsoft-json-version-3-5-0-0).

All future PRs will be double-checked to make sure all tests run, apologies for the miss.