Text this: PIVOT: Bridging Planning and Execution in LLM Agents via Trajectory Refinement