locale: unset LC_ALL since it overrides other variables
install: try to not use base64 first

base64 command does not work as expected on OS X. Decoding is done
with "-D" and not "-d".
install: enclose the upgrade into a function

return is not allowed outside of a function
locale: don't use grep to detect locale, split into an array
locale: add UTF-8 locale variants