Improve repo query destdir with root != "/"
Formatting improvements