sdk: Use /api if the URL doesn't have a path

Previous versions of the SDK hardcoded the location of the API, and some
clients rely on that and use URLs that don't have a path. This patch
changes the SDK so that it will automaticallu use /api in that case.

Change-Id: I334ec9b7010b9469dd5be78e51febeda39e404f3
Bug-Url: https://bugzilla.redhat.com/1066036
Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com>
(cherry picked from commit 38dc0765a4c5400ed2cd151ec4fbdff50efa9a9b)