Andy Murray was two points away from suffering a first-round loss at the French Open but he rallied to beat Radek Stepanek in five sets.