Remove traling slashes from namespace if present

When you provide an empty string for the admin namespace, but provided a namespace within your adapter then you get a resulting namespace with a trailing slash which leads to generate a url with two slashes.
Added a test and updated existing test to use set.