For clarity, the modified script:
https://paste.debian.net/911009/ (wow, they let me post it!). I don't know why it didn't work for you, looks like you did the right change.
You need to extract the initrd, replace both /bin/boot/9990-toram-todisk.sh and /bin/boot/9990-toram-todisk.sh with the modified version (chmod +x), rebuild initrd and use it to boot with.
This one works here whether live-media-path is dir_whatever/live/ or just dir_whatever/ .. (adjust syslinux.cfg to suit)
You sometimes need to do some work in busybox to debug this stuff. If you add "debug" to cmdline you get a "boot.log" which you can read with "less" or mount a drive and copy for later inspection.
Doing a separate script would be more difficult, they interact with others (mostly 9990-main and 9990-misc-helpers). It's just for a custom live initrd, (like we did to get a persistence file working without extra partitions) No need to modify the installed live-boot. By contrast live-config is actually designed to support individual custom scripts.
miyolinux, it's fine, no can of worms! Some of us actually enjoy hacking this stuff! Keeps me out of the pub. You can help test if you want.