Fixed HFE writer crash with preferred source
Fixed HFE writer crash with preferred source

The maximum track size was calculated from the existing bitstream,
but the final output was written using the preferred bitstream,
which might have been generated from a different source. If this
was larger the writer would crash when generating the output.

We now convert to the preferred format for sizing, and cache these
buffers for use during the output phase.

simonowen/samdisk,simonowen/samdisk,simonowen/samdisk