Fix method joinPaths()