Trim diagnostic strings in waitForOk

Trim some diagnostic strings to prevent stray \r's in the log
and better delimit the input in the log entries.
Merge pull request #68 from chrisy/feature/trim-diagnostics

Trim diagnostic strings in waitForOk (From Chris)