walkdir: iterates over contents of directory in pre- post- or breadth-first order