I really like the question. Anyone who ever needed the "fw unloadlocal" command will never forget that.
So I wanted to know how this method works before actually getting into such a situation where my stress level would go up.
I created the script, added the empty line and added the extension to a test vSEC gateway.
Make sure you use "bash nameofscript.sh" and not the standard filled in "sh script.sh"
The deployment of the script took about 4 minutes but at the end the policy uninstall was done. So it worked 
For some reason the deployment of the extension kept running, but you can uninstall the extension which you should do anyway.
I don't know why Check Point isn't releasing the official sk...this article is worth gold.