Threading fully implemented and working

After fiddling much too long I figured out a way to make threading work
in Ivans INI file.
Since we can only have one non-locking thread, I "outsourced" all
terminal output into its own function.
Working around the quirks of doing this took me the better half of
today, but now the INI file works reliably on my Mac, and is saving
images as expected.
The INI file still works under Linux
On both OSs the output to the console is not pretty anymore, we're
spewing much too many lines, but this is a small price to pay for a
working INI file...