Charities to appeal Supreme Court in inheritance dispute