Move _get_path to abstract content proxy

_get_path method in git has not been updated and caused problems. It
should be identical as the one in file_repo, therefore, moved it to
abstract class.

fixes #1762