fixes an issue with directory added twice to in appendURL
Merge pull request #389 from clemos/master

fixes an issue with directory added twice to in appendURL