Improved handling of poorly-structured data in structarr2tab and cell2structab