Fix unit test for optimized build by first checking to see if the output file exists before calling unlink on it