Exact Completion of Path Categories and Algebraic Set Theory -- Part I: Exact Completion of Path Categories