Close the files as we are done with them, otherwise we run out of file
descriptors.