Jakob has asked me to write a tiny script, which can be called from the commandline to add (or to prepend) an arbitrary text to a wiki page. The script is for mediawiki 1.3.11 (which uses wpEditToken instead of wpEdittime to detect edit collisions)
Usage: php editpage.php "Pagename" "A new text, created by ~~~~" "edit summary, optional"
Code on request Tom