Explicit import of the geometry module from imageproc.
Fix an error in left_to_right mode.

The error was introduced in commit 84d7734f27a69ab.
Fix pyflakes variable re-definition warnings.
Fix the rest of pyflakes warnings.
Use only relative imports.

A circular import between ocr and imageproc needed to be broken.