[ticket/13073] Correctly generate routes from subfolders like /adm

Ticket: https://tracker.phpbb.com/browse/PHPBB3-13073
I think that I have an idea to fix that but this patch is good for 3;1 I think. I don't want to change clean_path now so I'll try that for 3.2.