MacOSX/darwin test fixes

Fix the tests on darwin (Mac OS X) so that I have a baseline (on which to fix other pending patches).

Better suggestions for how to do 5a60ad6 welcome (the path doesn't actually exist on the FS, so can't canonically resolve it easily).