Fix for wind direction binning

Clean-up and tests added/revised