Updated test harness, merged Trond's fix for OSX hang.