Get_root_directory done. Now support path with a slash at the end.