New script to maintain a running average.

Special thanks to @stimms, whose blog post was the basis for this new script.