Properly match structured data output

Previous to this commit, if the expected_output was structured data, the
output was expected to be a string, which is not always correct.  This
commit uses the output_format parameter to determine if the output
should be compared as strings or structured data.
Merge pull request #1 from ccaum/fix_non_string_output_processing

Properly match structured data output