refactor: make encode_path private
Merge pull request #1008 from taavo/make_encode_path_private

refactor: make encode_path private