Select the top-level directory assuming it is the one with shorter path