Concatenate header and data arrays to create file.