on the newer maya like 2013.5 there is functionality to not hang on render window, because of that, the script just hit next frame , next frame, next frame, and then just render the last frame !
Thanks for reporting! I'll take a look later tonight.
Imagination is more important than knowledge.