remove trailing slash for root dir