Remove trailing spaces from sysfs attributes

Some sysfs attributes may contain trailing spaces, which only
serve to confuse matters. So strip them before continuing.

References: bnc#839593

Signed-off-by: Hannes Reinecke <hare@suse.de>