Hello tmarkoski. Your script does not work for me. My player is a E100 with Firmware 1.21, and the playlists created by your script are said to be "empty" by the player.
Inspecting these playlists and those created by "iriver plus 3", they still seem pretty much alike, only spacing is different, and the originals sometimes repeat some characters at the end. (like a superfluous ". m p 3")
Could you maybe track down what happened, if maybe some firmware version changed the format slightly, and adjust your script?