Unittest discovery

This causes intermittent "underlying C/C++ object has been deleted" errors on Ubuntu 12.05, otherwise seg faulting. It runs without problem on Windows.