Hi,
the erect2cubic script alone will not suffice (@Bruno: please correct me if I'm wrong)
You need to install panotools and a couple of underlying PERL dependencies. You can do this with CPAN or macports or homebrew, but in these cases you need access to the Mac. (Ever used TeamViewer? Multi-platform, no firewall issues and an absolute life saver. I use it a lot from my linux box to my daughters mac, a friends mac, my father in law's XP box, etc.)
As you already discovered: it works (slightly) different on a Mac. You can create a likewise applescript script which you create as a "droplet", which means that you are able to drag and drop one or more files on the icon and it will execute and "do it's magic".
The droplet could use Bruno's script.
I created quite some droplets but that was way back in 2007-2010.
You can also create a droplet with platypus (
http://sveinbjorn.org/platypus). It will allow you to put the panotools "stuff" and the script inside an OS X app. Drop the rectangular on it and it will do it's work. You could also make it to process multiple equirects to make multiple cubics.
And finally: you can create an "Automator" extension droplet to finder (the mac file manager) in combination with a perl, shell or python script.
My skills are a bit rusty as I moved away from Apple about 2 years ago. I will dust off my old mac and I'll try to have a look at it Wednesday afternoon/evening. If you manage it yourself before that time please mention it.
Harry