Add pretest hook to update testfiles