Bacteria such as Escherichia coli move about in a series of runs and tumbles: while a run state (straight motion) entails all the flagellar motors spinning in counterclockwise mode, a tumble is caused by a shift in the state of one or more motors to clockwise spinning mode. In the presence of an attractant gradient in the environment, runs in the favourable direction are extended, and this results in a net drift of the organism in the direction of the gradient. The underlying signal transduction mechanism produces directed motion through a bi-lobed response function which relates the clockwise bias of the flagellar motor to temporal changes in the attractant concentration. The two lobes (positive and negative) of the response function are separated by a time interval of $sim 1$s, such that the bacterium effectively compares the concentration at two different positions in space and responds accordingly. We present here a novel path-integral method which allows us to address this problem in the most general way possible, including multi-step CW-CCW transitions, directional persistence and power-law waiting time distributions. The method allows us to calculate quantities such as the effective diffusion coefficient and drift velocity, in a power series expansion in the attractant gradient. Explicit results in the lowest order in the expansion are presented for specific models, which, wherever applicable, agree with the known results. New results for gamma-distributed run interval distributions are also presented.