fix garbled arrays in posted JSON data

When posted JSON data contained arrays the wrapAsyncFuntions function in lib/script.js accidentally transformed these into objects, thereby garbling the script context's body property.