I see the quandry. The camera has its own mind. But maybe you can have it dump its pics into a folder, run the script and then move the files over.
But there might be a second solution. First time around, rename the files. Then, again, put the pics in an isolation booth whenever you get a new batch and then upload them via the media manager after installing the preservefilenames plugin:
http://www.dokuwiki.org/plugin:preservefilenames. But this would involve more work than the above. I have not used this plugin myself, so can't vouch for it. But it may be worth a try.