remove last trailing slash if exists
remove last trailing slash if exists

original php function works with path with trailing slash at the end too.
mojaray2k/phpjs,FlorinDragotaExpertvision/phpjs,VicAMMON/phpjs,davidgruebl/phpjs,janschoenherr/phpjs,ajenkul/phpjs,FlorinDragotaExpertvision/phpjs,cigraphics/phpjs,J2TeaM/phpjs,w35l3y/phpjs,praveenscience/phpjs,Mazbaul/phpjs,mojaray2k/phpjs,chand3040/phpjs,VicAMMON/phpjs,FlorinDragotaExpertvision/phpjs,imshibaji/phpjs,VicAMMON/phpjs,w35l3y/phpjs,strrife/phpjs,J2TeaM/phpjs,kvz/phpjs,strrife/phpjs,kvz/phpjs,mojaray2k/phpjs,kvz/phpjs,cigraphics/phpjs,hirak/phpjs,revanthpobala/phpjs,MartinReidy/phpjs,J2TeaM/phpjs,revanthpobala/phpjs,MartinReidy/phpjs,hirak/phpjs,FlorinDragotaExpertvision/phpjs,janschoenherr/phpjs,cigraphics/phpjs,MartinReidy/phpjs,praveenscience/phpjs,w35l3y/phpjs,kvz/phpjs,ajenkul/phpjs,chand3040/phpjs,w35l3y/phpjs,davidgruebl/phpjs,mojaray2k/phpjs,revanthpobala/phpjs,revanthpobala/phpjs,davidgruebl/phpjs,hirak/phpjs,janschoenherr/phpjs,strrife/phpjs,ajenkul/phpjs,Mazbaul/phpjs,Mazbaul/phpjs,praveenscience/phpjs,praveenscience/phpjs,J2TeaM/phpjs,hirak/phpjs,imshibaji/phpjs,Mazbaul/phpjs,strrife/phpjs,MartinReidy/phpjs,imshibaji/phpjs,janschoenherr/phpjs,cigraphics/phpjs,imshibaji/phpjs,ajenkul/phpjs,VicAMMON/phpjs,chand3040/phpjs,davidgruebl/phpjs