You shouldn't take that line out of the context. Christ first asked Peter: "Who do you believe Me to be?" And Peter answered: "Thou art the Son of the Living God." Then Christ said: "Thou art Peter and upon this rock I will build my Church." When asked the same question, others had answered to Christ that He was Elias, John the Baptist or one of the Prophets. Personally, I would like to think that when Christ said "upon this rock I will build my Church", he was confirming Peter's words that the belief that Christ is the Son of the God will be the foundation of His religion. Though you are certainly welcome to disagree.
Secondly, let's compare the lives of some of the Popes to Christ's teachings. They have killed innocent people and shed so much blood to merely retain power or for mere differences of opinion. There is little resemblance between the instructions of Christ and the manner of government of Popes. Thousands of men of science and learning, Protestants and other sinless souls died by the hands of the Papal government. Could Christ have ever sanctioned such a corrupt institution?