Primitive text direction feature detector

Simple and slow text direction feature detector.
Can work pretty reliable with text shreds without lines and handwritten text.

If you are operating on ints use / 2.0 to make it compatible with both, 2.x and 3.x python