NEXUS-5955: autorouting should not add files to prefixes

Except when they are on root.

Issue
https://issues.sonatype.org/browse/NEXUS-5955

CI
TBD