Fixed kt cltool

It now writes to the correct FILE*out

This feature is not used anywhere yet, but in principles should allow
cltools to be better integrated with e.g. MD code (using them to write
on the log file).
Fixed IMD Makefile