remove the last character '/' .