Attempt to close #838
The call to write the modified command list wasn't srgname-proof
Also removed old command scripting system - get the scripting module instead.