Append '/' to base url when necessary

Fixes #248.