knsupdate: add removing of trailing whitespaces before line processing

refs #2137

Change-Id: Ie9998e1d3a44adb1c613bdcfb664c7104671bc31