McMahon wins race for Elk County D.A.