doc: modernize and fix code examples in path.md
Checklist
-
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
doc, path
- unify spaces
- unify quotes
- unify semicolons by sections (all omitted / all present)
- update output examples