Fixing some environment variable reading logic.
Merge pull request #285 from aws/credential-profiles-check

Fixing some environment variable reading logic.