Magnetoresistance of dilute magnetic alloys