External commands fail gracefully when given invalid host/service names.

Added process_check_result script for tests too.

fixes #4647