Deal with root paths properly.