Fix LC_MESSAGES AttributeError
Fix LC_MESSAGES AttributeError

    Adds code to check if locale has the 'LC_MESSAGES' attribute before
    executing the following line of code:

        locale.getlocale(locale.LC_MESSAGES)[1]

    Fixes #1555

QuLogic/powerline,prvnkumar/powerline,areteix/powerline,blindFS/powerline,prvnkumar/powerline,EricSB/powerline,QuLogic/powerline,prvnkumar/powerline,S0lll0s/powerline,blindFS/powerline,QuLogic/powerline,S0lll0s/powerline,EricSB/powerline,S0lll0s/powerline,blindFS/powerline,areteix/powerline,EricSB/powerline,areteix/powerline