When GRUB clobbers it's own files rewrite them. Grubs not exactly the hardest booter to manually add or remove entries. I wouldn't bother getting to into the whole script based side just add the entries to menu.lst and reboot.