Fixes return value of sys_semaphore_create()

In case of att.addr() being NULL, CELL_EFAULT must be returnd and not
CELL_EINVAL, according to the corresponding ps3autotest.
Fixes segfaults for sys_event_flag_(create/get)

Neither sys_event_flag_create() nor sys_event_flag_get() checked for
NULL pointers in their arguments, which caused the corresponding test
from ps3autotests to segfault.
Merge pull request #868 from devmapal/master

Fixes issues in sys_semaphore_create() and sys_event_flag_(create/get)()
Minor fix
Merge pull request #869 from raven02/patch-8

Minor fix