Moved error logging and sys.exit to bin/taskrunner

The execute() function now returns the context to make it more testable.
Fix default cleanup option
Added basic unit tests