Simple changes in testing code of DBSDataDiscovery
Return exit codes to the client. Fixes #4388
Merge pull request #4473 from mmascher/exitcodes

Pull for exit codes (and an other simple fix)