adding remove trailing slash for paths