move vm_fixup call before writing the build.data

This is because we need to patch VM_SWAPDEV in some cases.
adapt to using a kernel/initrd from the build root