Set default locale before checking bash scripts

In other locales, error messages might not be parsed correctly.