I've had this script in various stages of completion for the last year or so. I've finally put it all together and added documentation and a working demo. Feel free to use it, (just humbly give me credit :D)
Feedback is welcome! Enjoy!
Edit: Fixed! All working now!