Finn Harps picked up an important win to move further clear of Longford Town at the bottom of the SSE Airtricity Premier Division.