ScriptGenerator: fix bug in argument parsing

An error in the case logic caused "--all" to stop being interpreted
correctly.