Less hacky handling of pathname -> segment array