Return the exit code in ScriptExecutor

Solving issue #987

Now the exit code from the script in project.json need to be zero to ensure a successful build/pack/restore.
No. The loop here allows multiple scripts to be executed. The conditional structure makes it quit only for the first non-zero exit code.