Allow buckets outside of US Default region to contain dots.

Uploading failed when we were using buckets that contained dots in the file name. After a little testing we found out that buckets with dots worked for the US default region but not in other regions. I've added additional code that specifies the region based on the bucket location.