That's a pretty fancy trick there.

It's too bad we can't bootstrap slimerjs with a JavaScript script. There are some pretty fancy commandline argument parsers that would work cross platform. I looked over the docs on MDN and it looks like that would require using the xpcshell. As far as I can tell, the xpcshell is only included with XULRunner SDK.