Update check for local environment to only set it when the last part of
the servername string is ".local". We were getting local configs getting
loaded in live environments where .local was being used in the server name
somewhere!