Margaret Mahy, who has died aged 76, was a writer of humorous, often fantastical stories for children and young adults and was praised by Alice Thomas Ellis as one of those rare children???s authors whose books can also be read with pleasure by grown-ups.