Fix tests on Windows

This patch moves tests to tests/testthat (so that they actually run on winbuilder) and then fixes the tests that were broken on Windows. 

Tests were failing because `xxx_dir()` functions running on Windows normalise paths Windows style even when the the os argument is set to e.g. 'mac'. The only way round this that I can see without major surgery is to normalise the baseline paths in the same way.