re-implement the logic the find non-branching parts in the
primary path. The original code introduce a bug that some of the
associated contigs may not be captured and will be missed from
the assembly. Add a number of safe-guards to make sure
we output everything. Some people don't like more contig number. However,
I think they should care more about the truth in the data rather
than looking the superficial numbers of contigs.
fix a bug introduce by the last commit bb8215bbc9