Fix writing locale in the installer