Fixed bugs in locomotion_bends

Code now runs.  Basically:

1. I had an index off by one, in h__foragingData
2. I was using mean instead of nanmean in h__computeAvgAngles
3. I missed the return statement (easy to do since Matlab doesn't have
them) of h__foragingData