Simple. The claim isn't that popes are saints, or that bishops are saints, or that priests are saints, or that the laity are saints. The only person who makes us holy is Christ Jesus.
The claim is that there is apostolic succession. Bad popes don't negate that.
As for the popes from the ummm not-so-unbiased site you linked, I'd have some questions: how does the election of some popes by prostitutes (e.g. Anastasius III - though I couldn't find for this claim) make the person a bad pope?; how is Pius IX guilty of kidnapping and "megalomania"?; the claim that some of those popes listed are "genocidal maniacs" is somewhat hard to sustain; and I love "greed and avarice" too numerous to list. This isn't serious historical evidence by a long shot. Plus, if the author could only list 10 or so out of over 250 popes, that's not such a bad run.
Regardless, no one is stating that popes are perfect and sinless.