Added a way to check the creds to see if its is an object or a location and handles it accordingly.

This function name doesn't make it clear to me what it's doing.  Even something as simple as `getCreds( opts.creds )` seems clearer, at least in the calling context.  E.g.  `aws = credsValidity(opts.creds);` (above) makes me wonder what `credsValidity` is returning.  I can look it up, but `aws = getCreds(opts.creds);`is more immediately obvious: it returns the credentials.