On a Class of Matroids Arising From Paths in Graphs