Fix bug when provider is `google` and add test coverage

This adds test coverage that was unfortunately missing and resulted in #2298 shortly after yesterday's release. It also fixes the issue and as a side effect sets the shared credential file name based on the provider name.

Note: this **only** affects users who have set the provider to something other than `aws`.

@jamesls please review.