fix bug with ../.. paths joining
Merge pull request #1981 from kolipka/master

fix bug with ../.. paths joining