path2: Update for latest master

Also fix some issues that crept into earlier commits during the conflict
resoution for the rebase.
path2: Update for privacy changes

Remove redundant `contains_nul` definition.

Make `parse_prefix` private.