Real Madrid beat Espanyol to ensure Barcelona must wait for the La Liga title, which they could seal in El Clásico next Sunday.