Fixed formatting of test results into json before saving. Allow jobs to be run synchronously. Only update spreadsheet if 'local' flag not set.