I typically just pop open Acorn, create a new 512x512 image, and drag and drop the application bundle onto the canvas. Then center, resize, and export for web.
Probably a few more steps than invoking a Bash script, but a lot more user-friendly. :-)
There's no doubt there are a dozen easier ways to do this. Path Finder lets you drag an app's preview straight to the desktop. I just got a bug to figure out the whole process and automate it, and after that kind of nerdery, it seemed silly not to document it :).