The ruling came in an appeal taken by RTÉ and other media outlets in the case of a woman who was found not guilty by reason of insanity of killing her three-year-old daughter