Add an additional test for backwards-reaching relative paths.
Replace 'segment.start() + segment.length()' with simply 'segment.end()'.
Remove a duplicated start position modification on the username segment during the assembly.