Barcelona closed in on the La Liga title after Fermín López and Marcus Rashford scored to help earn its first win at Getafe in six seasons.