It took me a bit of time to get the code from @Andrew Roberts to work with an array of folders .. If you're having trouble with that too, check my fork at https://gist.github.com/3666392
Thanks for the great script @Andrew Roberts and @jcordasc .. just what I needed.