Highland councillors have backed a plan by the local authority to purchase Fort William's only remaining nursing home.