Fix tests + add options for wrapping the JSON output in a Node.js export or Require.js definition