IO_WIKIPAGE_WRITE is called twice on a save event. Once for saving the page and once for storing the attic. This is - if not a bug - at least confusing. Adding some event data to make both calls easily distinguishable might be a good idea.
See
http://forum.dokuwiki.org/post/3914 for details