Simple, clean, straightforward. I've done similar things in bash before but not bothered to publish :) It's a good idea though to have an ecosystem of simple but flexible tools like this.
Here's another idea we implemented alongside a backup system like this. Say you run a backup daily; you can run another script to prune the archives, keeping D most recent daily archives, W most recent weekly archives, M most recent monthly archives, and all yearly archives.