Changed .reject statement for deleting directories and files.