Statistical mechanics of random paths on disordered lattices