Test whether the directory has been created before iterating through it