Provide real error messaging for functional test failures

Fixes #178.

(cherry picked from commit 71cc8891a9aa2f7687a228b00cb6e107ccf312be)
Merge branch '1.6' into 1.6-geezer