A flip to second base gone awry threatened to sap the St. Louis Cardinals of the momentum that has carried them from the doldrums of August to the middle of the playoff race in September. No matter. A series of small moves executed perfectly allowed the Cardinals to rally against one of the best closers in the game. Randal Grichuk scored after an error by Pirates shortstop Jordy Mercer, capping a frantic ninth-rally that lifted surging St. Louis over Pittsburgh 4-3 on Friday night. The wild-card chasing Cardinals won their fourth straight, despite trailing by a run entering the ninth against Felipe Rivero, who came in having blown just one save all season.