only attempt shared creds load if path is a file
Merge pull request #2305 from raphaellig/shared-credentials-load-fix

Only attempt shared creds load if path is a file. Fixes #2305.