Use valgrind to check for memory leaks in the tests.