Ubuntu-mate and Raspbian have a package called pi-bluetooth which basically contains a udev rule that does that from what I remember.
Here are all the scripts I used - https://1drv.ms/u/s!AvHY_kl4hMB4gQM56ORE2aveZ_CQAlso, could you please dig out the script you used. And one more thing, did you use the classic server image and installed the xfce gui.
To create the installers run build-pi-iso. It creates the squashfs filesystem, and then will error out when it tries to build the iso. Complete-iso will tidy things up. All you really have to do with these scripts is replace xubuntu with ubuntu-mate. You'll need to add a config.txt, cmdline.txt and GPU firmware to make it bootable on the pi. You'll need to add preseed files if you want ubiquity to work. The debian live-build system is very well documented if you look it up online.
The xubuntu-core image started off life as an installer built using the above scripts. For some reason, ubiquity doesn't like xubuntu-core and will only let you do a full disk installation. So the installers weren't suitable for release. Using the installer I did an oem install to an sd card. I then used the create_img script (which is a slimmed down version of the cloud image script I spoke of before) to transfer the files from the sd card to a virtual disk. The script expects the root filesystem to be mounted at chroot and the fat partition to be mounted at boot.
There are probably better ways to do this if your intention is to just create disk images. You could just use the flavour maker sccripts. Martin Wimpress has made presentations which you can look up which explain how they work.