afs: refactor directory checking in DRead