Path conversion refactorings and tests.