removing filename from root path