Fix operator precedence bug in direction bit test. Fixes issue #8.