Fix $.traverse

The Deferred returned by $.traverse did not resolve with an array.
Correctly handle ]]>

Also remove some extraneous newlines.