Fix error message listing directories