The binarycreator uses a mkdmg.sh helper script at runtime to create .dmg file if requested. This script performs the following assignment:
This doesn't actually create a random file name. OS X uses the BSD implementation of mktemp. The man page explains:
The trailing `Xs' are replaced with the current process number and/or a unique letter combination.
(emphasis by me).
Hence, on OS X, the `XXXXXX` part should be at the end of the template. Alas, the patch isn't that trivial since that causes the `hdiutil` used further down in the script to no longer recognize the image file format correctly.