fix path joining to support protocols