remove trailing slash on path