ksgen/log_color: simplified to work only on linux

Change-Id: I75983122e1f2daa41ade1e677477550a94bdae65
ksgen: minor pylint corrections

Corrects most of the important errors and warnings pointed out by
pylint

Change-Id: I0a83d4533ab94a31004282d3cabec88f259e5a2b