Fix checks for avaiable locales and LANG

For whatever reason, is C.UTF-8 (uppercase), but es_ES.utf-8 (lowercase)...