Fix site-deploymentscript tests to run properly.

Also fix cli-executor to call the end() func only once.
Fixed issue #211.