pwm: fixed wrong line ending being checked by strtol

Bugfix: fixed a bug in using pwm with c/c++ caused by the port from fopen to POSIX open

Signed-off-by: Maximilian von Tschirschnitz <maximilian.tschirschnitz@intel.com>
Merge branch 'master' of https://github.com/maxdos64/mraa