sensors: fix segfault if sysfs not found
update api sample