PRD-5073 - Copied the RepositoryPathEncoder class into this project.

That avoids the dependency and side-effects of having the platform
sitting in the classpath.