Some nicer help text for test program.
Give nicer command line error messages.
Add better check for direction.

Don't just pick the direction of one of the successful images.
Instead count the direction counts and use the best one.