Add new functions to read directories with an fd.