Make sure that no folders are used from the directory iterator.