Mads Pedersen took the sprint victory on Stage 3 of Paris-Nice after race leader Christophe Laporte crashed on the final straight.