remove trailing backslash in path