Valgrind test script.
Script for memory leak testing. Enable by ./configure --enable-valgrind