Corrected bug when writing retroarch joystick file.