Make localizations work on Mac OS

Locale variables aren't set by default, so locale.getlocale() evaluates
to (None, None), which doesn't work very well.
Add python bytecode to src/.gitignore