Added code to output dot files for testcases.