Automatically get root path.