Using rb_sys_fail for some syscalls fail

Using rb_sys_fail so that we can check errno when syscall fails.
I think it's better than using assert(0).