Add a test for files before copying them.