Add a recursive definition of readdir.

Currently not tail recursive.