path2: Update for privacy changes

Remove redundant `contains_nul` definition.

Make `parse_prefix` private.