When appending mxArrays to an already written matfile, sometimes dataCorruption occurs.
This seems to be due to padding not being performed correclty when appending.
So padding rules need to be adjusted to take into accout that a file header was not written.