Run command line and escripts in a new process without trap exit

Closes #1985