Don't cd before running the program, instead pass testdir as argument,