I don’t know much about disks, but things have been changing a lot in the upgrades from what I see. You might need to look if there are changes in the man page for the diskutil.
Anyway, in Finder try running:
tell application "Finder"
first disk whose name is "NX5U"
end tell
It still works when working with a test disk image for me. Just verifying that the disk image ejects with the ‘eject’ command.
I’ve used the following and everything works fine. 18 of 20 cards were successfully formatted and ejected. However, I had to add a 3 seconds delay for the system to see the NX5U card. Without the delay, the system tried to eject an unmounted card.
Do shell script "diskutil eraseVolume \"MS-DOS FAT32\" NX5U /Volumes/NX5U"
delay 3
tell application "Finder" to eject disk "NX5U"