fixed removal of trailing slash is not enough. (refs 3633, BP from #1632)
Merge pull request #148 from amashigeseiji/t-3633-trailing-slash

fixed removal of trailing slash is not enough. (refs 3633, BP from #1632)