dfs search for paths in digraph