Implement get_stop_reason and add a helper for debugging targets that get into a bad state
Merge pull request #93 from cgjones/get-stop-and-emergency-debug

Implement get_stop_reason and add a helper for debugging targets that get into a bad state