Get the topic_name based on the location including uris which contain slashes

Fixes #221