Find the longest array to create the header row from

With multidimensional arrays it's possible to have the longest array
anywhere within the source. Searching for the longest record and using
that will mean that all entries will have the correct headings.
Merge pull request #5 from EspadaV8/feature/improved-nested-arrays

Improved multilevel array exports.. Thanks for including the tests :-)