Duror Primary in the Highlands has been saved after locals campaigned to stop its planned closure.