What I did (I *think*, this was ages ago), was use BlizKick to load a normal KS3.1 image, and apply all the OS3.9 patches and modules I wanted using EXTRESBUF to create extra space. IIRC, BlizKick has an option to save the new ROM it creates back out to disk, and thats what I used.
This won't work, I'm afraid. The EXTRESBUF is outside the ROM image itself. Modules placed on EXTRES area are not saved to the image.
There is no way to get the EXTRES modules included in the 512K image.
Only the modules that can be applypatch'ed make it to the ROM Image.
For further details, see BlizKick.guide.