Check test file exists before running require()