Minor fixes to functionalTestAPI

API now correctly outputs results from script in format specified in
function comments.