remove last slash for path in doc