Move code to diagnose batch run to TestBatch
Fix #includes in TestRunner.c