dmg: fix checksum error

I realize that @planetbeing is not really active or responsive here, but I'm submitting this in the event that someone who's googling this issue may stumble onto this PR.

When using 'dmg' to compact an existing dmg, the resulting file has an invalid checksum. A workaround is proposed here: http://shanemcc.co.uk/libdmg/ which disables the checksum. That seems less than ideal.

Instead, this change adds the checksum data where it should be. My Macbook on 10.6 is happy with it, whereas before the change it reported the broken checksum.