Set the current directory to the first existing path.