Handle error in readdir() callback.