Added dos header write support to the image builder class