Add gitignore for gedit backup files.
Add platform-independent code.