fix: sysfs: handle failure path correctly for readdir()