Prevent occasional 500 errors on export to S3

Very occasionally (twice so far), the export listing function has failed when JSON serialization failed for some reason.  This will catch any future errors of this type.

@bjshort - turns out the other places I thought there might be problems are all OK, so only these small changes to make.