use mktemp instead of tempfile for better cross-distro compatibility
Detect tesseract and use convert to make image grayscale before running - Fixes #1