Ryan Harpur scored Dungannon's late winner at Stangmore Park.