Fix running of tests. Will switch to ctest soon.