Thanks to a comment from Evaryont on the original SMS from the command line with Google Voice post, a problem that was causing Error 500s in the script has been solved.
This is a companion discussion topic for the original entry at https://brettterpstra.com/2011/09/08/gvoice-command-line-sms-revisited