clean_path should not drop the last character
clean_path should not drop the last character

Fixes https://github.com/gitlabhq/gitlabhq/issues/9098

theonlydoo/gitlabhq,aaronsnyder/gitlabhq,fantasywind/gitlabhq,LUMC/gitlabhq,fpgentil/gitlabhq,Burick/gitlabhq,ferdinandrosario/gitlabhq,eliasp/gitlabhq,since2014/gitlabhq,dwrensha/gitlabhq,DanielZhangQingLong/gitlabhq,tk23/gitlabhq,yfaizal/gitlabhq,H3Chief/gitlabhq,cncodog/gitlab,NKMR6194/gitlabhq,initiummedia/gitlabhq,joalmeid/gitlabhq,dreampet/gitlab,yuyue2013/ss,jrjang/gitlab-ce,SVArago/gitlabhq,ttasanen/gitlabhq,nguyen-tien-mulodo/gitlabhq,bbodenmiller/gitlabhq,luzhongyang/gitlabhq,jrjang/gitlab-ce,michaKFromParis/gitlabhqold,martinma4/gitlabhq,OtkurBiz/gitlabhq,michaKFromParis/sparkslab,yama07/gitlabhq,szechyjs/gitlabhq,stoplightio/gitlabhq,stanhu/gitlabhq,copystudy/gitlabhq,johnmyqin/gitlabhq,LUMC/gitlabhq,michaKFromParis/gitlabhq,jvanbaarsen/gitlabhq,nmav/gitlabhq,Telekom-PD/gitlabhq,axilleas/gitlabhq,zBMNForks/gitlabhq,vjustov/gitlabhq,rumpelsepp/gitlabhq,axilleas/gitlabhq,k4zzk/gitlabhq,sakishum/gitlabhq,ksoichiro/gitlabhq,ikappas/gitlabhq,szechyjs/gitlabhq,michaKFromParis/gitlabhq,aaronsnyder/gitlabhq,copystudy/gitlabhq,fpgentil/gitlabhq,Devin001/gitlabhq,rhels/gitlabhq,tim-hoff/gitlabhq,mavimo/gitlabhq,sonalkr132/gitlabhq,tempbottle/gitlabhq,NKMR6194/gitlabhq,manfer/gitlabhq,mr-dxdy/gitlabhq,yonglehou/gitlabhq,kemenaran/gitlabhq,ksoichiro/gitlabhq,theodi/gitlabhq,rumpelsepp/gitlabhq,ngpestelos/gitlabhq,folpindo/gitlabhq,dukex/gitlabhq,darkrasid/gitlabhq,williamherry/gitlabhq,daiyu/gitlab-zh,theonlydoo/gitlabhq,Razer6/gitlabhq,kemenaran/gitlabhq,nguyen-tien-mulodo/gitlabhq,mrb/gitlabhq,rhels/gitlabhq,williamherry/gitlabhq,WSDC-NITWarangal/gitlabhq,Burick/gitlabhq,pjknkda/gitlabhq,stanhu/gitlabhq,gopeter/gitlabhq,yama07/gitlabhq,mrb/gitlabhq,rhels/gitlabhq,cncodog/gitlab,fpgentil/gitlabhq,Soullivaneuh/gitlabhq,shinexiao/gitlabhq,manfer/gitlabhq,fearenales/gitlabhq,Tyrael/gitlabhq,sue445/gitlabhq,martinma4/gitlabhq,mr-dxdy/gitlabhq,it33/gitlabhq,hzy001/gitlabhq,ordiychen/gitlabhq,hq804116393/gitlabhq,chadyred/gitlabhq,cui-liqiang/gitlab-ce,dreampet/gitlab,shinexiao/gitlabhq,lvfeng1130/gitlabhq,zBMNForks/gitlabhq,liyakun/gitlabhq,michaKFromParis/sparkslab,fgbreel/gitlabhq,allysonbarros/gitlabhq,Razer6/gitlabhq,williamherry/gitlabhq,joalmeid/gitlabhq,julianengel/gitlabhq,theodi/gitlabhq,sakishum/gitlabhq,OtkurBiz/gitlabhq,theodi/gitlabhq,hacsoc/gitlabhq,cui-liqiang/gitlab-ce,jrjang/gitlabhq,LytayTOUCH/gitlabhq,rebecamendez/gitlabhq,koreamic/gitlabhq,koreamic/gitlabhq,allistera/gitlabhq,OlegGirko/gitlab-ce,tempbottle/gitlabhq,mrb/gitlabhq,sue445/gitlabhq,allistera/gitlabhq,darkrasid/gitlabhq,mente/gitlabhq,eliasp/gitlabhq,pjknkda/gitlabhq,louahola/gitlabhq,dreampet/gitlab,TheWatcher/gitlabhq,Burick/gitlabhq,iiet/iiet-git,ttasanen/gitlabhq,WSDC-NITWarangal/gitlabhq,pulkit21/gitlabhq,ayufan/gitlabhq,MauriceMohlek/gitlabhq,delkyd/gitlabhq,theodi/gitlabhq,ayufan/gitlabhq,ttasanen/gitlabhq,larryli/gitlabhq,whluwit/gitlabhq,H3Chief/gitlabhq,dplarson/gitlabhq,it33/gitlabhq,jirutka/gitlabhq,SVArago/gitlabhq,theonlydoo/gitlabhq,zBMNForks/gitlabhq,childbamboo/gitlabhq,childbamboo/gitlabhq,revaret/gitlabhq,delkyd/gitlabhq,screenpages/gitlabhq,openwide-java/gitlabhq,sakishum/gitlabhq,since2014/gitlabhq,hq804116393/gitlabhq,youprofit/gitlabhq,julianengel/gitlabhq,allistera/gitlabhq,mente/gitlabhq,axilleas/gitlabhq,martinma4/gitlabhq,gopeter/gitlabhq,zrbsprite/gitlabhq,H3Chief/gitlabhq,johnmyqin/gitlabhq,stoplightio/gitlabhq,jvanbaarsen/gitlabhq,cinderblock/gitlabhq,gorgee/gitlabhq,delkyd/gitlabhq,axilleas/gitlabhq,ttasanen/gitlabhq,kitech/gitlabhq,htve/GitlabForChinese,gopeter/gitlabhq,DanielZhangQingLong/gitlabhq,liyakun/gitlabhq,since2014/gitlabhq,sonalkr132/gitlabhq,fantasywind/gitlabhq,Exeia/gitlabhq,initiummedia/gitlabhq,eliasp/gitlabhq,ayufan/gitlabhq,tim-hoff/gitlabhq,per-garden/gitlabhq,jvanbaarsen/gitlabhq,NKMR6194/gitlabhq,dvrylc/gitlabhq,MauriceMohlek/gitlabhq,liyakun/gitlabhq,chenrui2014/gitlabhq,daiyu/gitlab-zh,delkyd/gitlabhq,salipro4ever/gitlabhq,lvfeng1130/gitlabhq,chadyred/gitlabhq,bigsurge/gitlabhq,screenpages/gitlabhq,it33/gitlabhq,LUMC/gitlabhq,kitech/gitlabhq,Razer6/gitlabhq,ngpestelos/gitlabhq,H3Chief/gitlabhq,bigsurge/gitlabhq,vjustov/gitlabhq,cncodog/gitlab,zrbsprite/gitlabhq,folpindo/gitlabhq,yama07/gitlabhq,michaKFromParis/gitlabhq,kitech/gitlabhq,luzhongyang/gitlabhq,flashbuckets/gitlabhq,michaKFromParis/gitlabhqold,allysonbarros/gitlabhq,rumpelsepp/gitlabhq,mavimo/gitlabhq,yonglehou/gitlabhq,julianengel/gitlabhq,OlegGirko/gitlab-ce,bozaro/gitlabhq,wangcan2014/gitlabhq,dukex/gitlabhq,chenrui2014/gitlabhq,jaepyoung/gitlabhq,ordiychen/gitlabhq,dukex/gitlabhq,kitech/gitlabhq,mente/gitlabhq,jvanbaarsen/gitlabhq,dwrensha/gitlabhq,TheWatcher/gitlabhq,fendoudeqingchunhh/gitlabhq,revaret/gitlabhq,sekcheong/gitlabhq,kemenaran/gitlabhq,htve/GitlabForChinese,fantasywind/gitlabhq,OtkurBiz/gitlabhq,sakishum/gitlabhq,LytayTOUCH/gitlabhq,lvfeng1130/gitlabhq,iiet/iiet-git,fscherwi/gitlabhq,fendoudeqingchunhh/gitlabhq,martijnvermaat/gitlabhq,szechyjs/gitlabhq,dwrensha/gitlabhq,dvrylc/gitlabhq,wangcan2014/gitlabhq,copystudy/gitlabhq,Devin001/gitlabhq,mavimo/gitlabhq,Burick/gitlabhq,yatish27/gitlabhq,mavimo/gitlabhq,hacsoc/gitlabhq,zrbsprite/gitlabhq,bbodenmiller/gitlabhq,fgbreel/gitlabhq,k4zzk/gitlabhq,aaronsnyder/gitlabhq,stanhu/gitlabhq,nguyen-tien-mulodo/gitlabhq,yfaizal/gitlabhq,duduribeiro/gitlabhq,szechyjs/gitlabhq,lvfeng1130/gitlabhq,icedwater/gitlabhq,initiummedia/gitlabhq,julianengel/gitlabhq,t-zuehlsdorff/gitlabhq,fscherwi/gitlabhq,openwide-java/gitlabhq,whluwit/gitlabhq,ordiychen/gitlabhq,cncodog/gitlab,ferdinandrosario/gitlabhq,mmkassem/gitlabhq,salipro4ever/gitlabhq,wangcan2014/gitlabhq,stoplightio/gitlabhq,luzhongyang/gitlabhq,nmav/gitlabhq,michaKFromParis/sparkslab,per-garden/gitlabhq,bozaro/gitlabhq,NKMR6194/gitlabhq,Devin001/gitlabhq,Tyrael/gitlabhq,ferdinandrosario/gitlabhq,stanhu/gitlabhq,bozaro/gitlabhq,allysonbarros/gitlabhq,hq804116393/gitlabhq,sekcheong/gitlabhq,Datacom/gitlabhq,WSDC-NITWarangal/gitlabhq,michaKFromParis/gitlabhq,DanielZhangQingLong/gitlabhq,fscherwi/gitlabhq,rhels/gitlabhq,louahola/gitlabhq,michaKFromParis/sparkslab,jaepyoung/gitlabhq,pulkit21/gitlabhq,screenpages/gitlabhq,OlegGirko/gitlab-ce,rebecamendez/gitlabhq,revaret/gitlabhq,MauriceMohlek/gitlabhq,fendoudeqingchunhh/gitlabhq,nmav/gitlabhq,ayufan/gitlabhq,youprofit/gitlabhq,bigsurge/gitlabhq,koreamic/gitlabhq,cui-liqiang/gitlab-ce,jrjang/gitlab-ce,yonglehou/gitlabhq,since2014/gitlabhq,iiet/iiet-git,per-garden/gitlabhq,yonglehou/gitlabhq,cinderblock/gitlabhq,michaKFromParis/gitlabhqold,darkrasid/gitlabhq,shinexiao/gitlabhq,t-zuehlsdorff/gitlabhq,ikappas/gitlabhq,nmav/gitlabhq,initiummedia/gitlabhq,jirutka/gitlabhq,hzy001/gitlabhq,wangcan2014/gitlabhq,darkrasid/gitlabhq,fendoudeqingchunhh/gitlabhq,larryli/gitlabhq,cinderblock/gitlabhq,sekcheong/gitlabhq,Exeia/gitlabhq,per-garden/gitlabhq,LUMC/gitlabhq,openwide-java/gitlabhq,hq804116393/gitlabhq,icedwater/gitlabhq,pulkit21/gitlabhq,fearenales/gitlabhq,yatish27/gitlabhq,ordiychen/gitlabhq,iiet/iiet-git,luzhongyang/gitlabhq,tim-hoff/gitlabhq,SVArago/gitlabhq,daiyu/gitlab-zh,larryli/gitlabhq,dwrensha/gitlabhq,duduribeiro/gitlabhq,joalmeid/gitlabhq,cui-liqiang/gitlab-ce,martijnvermaat/gitlabhq,ikappas/gitlabhq,k4zzk/gitlabhq,johnmyqin/gitlabhq,it33/gitlabhq,revaret/gitlabhq,ferdinandrosario/gitlabhq,fpgentil/gitlabhq,fgbreel/gitlabhq,kemenaran/gitlabhq,yuyue2013/ss,childbamboo/gitlabhq,larryli/gitlabhq,Telekom-PD/gitlabhq,Soullivaneuh/gitlabhq,mmkassem/gitlabhq,tk23/gitlabhq,rumpelsepp/gitlabhq,htve/GitlabForChinese,t-zuehlsdorff/gitlabhq,tk23/gitlabhq,pulkit21/gitlabhq,fscherwi/gitlabhq,hzy001/gitlabhq,mmkassem/gitlabhq,johnmyqin/gitlabhq,dplarson/gitlabhq,yuyue2013/ss,youprofit/gitlabhq,bbodenmiller/gitlabhq,liyakun/gitlabhq,manfer/gitlabhq,martijnvermaat/gitlabhq,jaepyoung/gitlabhq,Soullivaneuh/gitlabhq,bbodenmiller/gitlabhq,aaronsnyder/gitlabhq,whluwit/gitlabhq,Telekom-PD/gitlabhq,ngpestelos/gitlabhq,jrjang/gitlab-ce,ksoichiro/gitlabhq,pjknkda/gitlabhq,Devin001/gitlabhq,t-zuehlsdorff/gitlabhq,yatish27/gitlabhq,TheWatcher/gitlabhq,ngpestelos/gitlabhq,chenrui2014/gitlabhq,tim-hoff/gitlabhq,duduribeiro/gitlabhq,folpindo/gitlabhq,stoplightio/gitlabhq,tk23/gitlabhq,mr-dxdy/gitlabhq,williamherry/gitlabhq,gopeter/gitlabhq,dplarson/gitlabhq,vjustov/gitlabhq,sue445/gitlabhq,OlegGirko/gitlab-ce,zrbsprite/gitlabhq,tempbottle/gitlabhq,dvrylc/gitlabhq,jaepyoung/gitlabhq,hacsoc/gitlabhq,bigsurge/gitlabhq,Exeia/gitlabhq,koreamic/gitlabhq,chenrui2014/gitlabhq,rebecamendez/gitlabhq,mmkassem/gitlabhq,michaKFromParis/gitlabhqold,mente/gitlabhq,shinexiao/gitlabhq,yfaizal/gitlabhq,LytayTOUCH/gitlabhq,whluwit/gitlabhq,yama07/gitlabhq,bozaro/gitlabhq,salipro4ever/gitlabhq,chadyred/gitlabhq,Razer6/gitlabhq,gorgee/gitlabhq,DanielZhangQingLong/gitlabhq,gorgee/gitlabhq,LytayTOUCH/gitlabhq,youprofit/gitlabhq,sonalkr132/gitlabhq,Datacom/gitlabhq,fearenales/gitlabhq,yuyue2013/ss,yfaizal/gitlabhq,jrjang/gitlabhq,dukex/gitlabhq,Tyrael/gitlabhq,flashbuckets/gitlabhq,fgbreel/gitlabhq,hacsoc/gitlabhq,eliasp/gitlabhq,martinma4/gitlabhq,OtkurBiz/gitlabhq,Datacom/gitlabhq,sue445/gitlabhq,allistera/gitlabhq,sonalkr132/gitlabhq,jirutka/gitlabhq,allysonbarros/gitlabhq,sekcheong/gitlabhq,hzy001/gitlabhq,dplarson/gitlabhq,jirutka/gitlabhq,theonlydoo/gitlabhq,mr-dxdy/gitlabhq,SVArago/gitlabhq,louahola/gitlabhq,Exeia/gitlabhq,childbamboo/gitlabhq,Soullivaneuh/gitlabhq,vjustov/gitlabhq,salipro4ever/gitlabhq,Telekom-PD/gitlabhq,fearenales/gitlabhq,manfer/gitlabhq,ikappas/gitlabhq,icedwater/gitlabhq,ksoichiro/gitlabhq,jrjang/gitlabhq,screenpages/gitlabhq,cinderblock/gitlabhq,louahola/gitlabhq,Tyrael/gitlabhq,fantasywind/gitlabhq,pjknkda/gitlabhq,nguyen-tien-mulodo/gitlabhq,flashbuckets/gitlabhq,daiyu/gitlab-zh,folpindo/gitlabhq,k4zzk/gitlabhq,zBMNForks/gitlabhq,joalmeid/gitlabhq,jrjang/gitlabhq,chadyred/gitlabhq,MauriceMohlek/gitlabhq,icedwater/gitlabhq,martijnvermaat/gitlabhq,Datacom/gitlabhq,htve/GitlabForChinese,rebecamendez/gitlabhq,WSDC-NITWarangal/gitlabhq,tempbottle/gitlabhq,dvrylc/gitlabhq,TheWatcher/gitlabhq,flashbuckets/gitlabhq,duduribeiro/gitlabhq,openwide-java/gitlabhq,copystudy/gitlabhq,mrb/gitlabhq,yatish27/gitlabhq,dreampet/gitlab,gorgee/gitlabhq