tests: Simplify reading platform_profile value
Which allows us to ignore trailing spaces in the sysfs attribute, as power-profiles-daemon writes those mock files without a linefeed, but the real kernel (or some of our setup functions) would always append a linefeed.