Fixed failure when a directory could not be enumerated.