fix ec2 cloud provider for endpoint URLs with paths

The EC2 endpoint for the NeCTAR OpenStack cloud has a path end.
The logic in the `ec2.py` cloud module did not handle that properly, leading to failed authentication.
This small patch fixed it for me. I don't, however, have extensive EC2 experience or experience with other EC2 compatible endpoints.
Happy to iterate on this/test further until everyone is happy.