Fixed write_grub to create clean and neat config files.