Implementation of Kosaraju's Algorithm - appears correct but recurses too much for Python