Enhancement: use exit code from run()

Necessary to be able to tell if command ran successfully or not.
Merge pull request #397 from easybiblabs/topics/fix-exitcode

Enhancement: use exit code from run()