Fix up the url construction

1. Make sure the path derived from the method call doesn't have leading /
2. Make sure the base URL is normalized to have a trailing /