fix(paths): use native `path` methods consistently