pwm: fixed wrong line ending being checked by strtol

Move from fopen to POSIX open introduced this bug in strtol

Signed-off-by: Maximilian von Tschirschnitz <maximilian.tschirschnitz@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>