Add tests for SCC and fix SCC algorithm.