Provide real error messaging for functional test failures

Fixes #178.

(cherry picked from commit 71cc8891a9aa2f7687a228b00cb6e107ccf312be)