fix bugs at path join and relative

fixed a bug in relative if root has "/" postfix.

Only remove a single "/" from root.
Elsewise it fails at:
root = "http://"
path = "www.example.com"
-> "http:/www.example.com" :(
correct is "http://www.example.com" :)