The problem is partly because the script is reacting to itself in an endless feedback loop if you remove the NEWTAB=findexisting
line.
You can fix it by adding the NOSCRIPT
argument to the command it runs:
cmd.RunCommand('Go' +
' PATH="' + pairedFolder.path + '"' +
// ' NEWTAB=findexisting' +
' OPENINDUAL NOSCRIPT');