improved joinUrl (now handles '/')
merged