added depthfirst option to directed.walk