I am also interested in a script such as this one. However I can think of a few hardware limitations that would prevent this.
1, a while ago someone helped me with a script that would flash the AF light after taking a long picture (to help my timing with light painting) The issue with this script was it would flash after the dark frame subtraction had done it's business and after the file was written. (so it was twice what the shutter speed was, plus a bit extra to write, before it would flash) Which leads me to.
2. This means the camera can only do one thing while taking a picture, and that is take a picture. I don't think a script can be running in the background at the same time.
If I'm wrong, (which I hope I am) then I would adore a script such as this.