Donaldson-Thomas invariants, torus knots, and lattice paths