This is a tiny program which removes degenerate faces from a polygonal mesh and performs border stitching (removing of duplicate vertices and edges). mesh-repair uses CGAL and can read/write Wavefront OBJ meshes and whatever else CGAL can read/write.
Install cmake and CGAL and run from this directory:
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE ..
make
make install (optional)
mesh-repair <input-file> <output-file>