Add .gitignore
Use bash instead of sh
Reset locales
Simplify extraction of svn revision