Improve sceIo for passing autotest

Can pass "io", "cwd" and "directory" test.
Fail on "file" test on file access mode. PSP see rw-r--r-- instead of rw-rw-r-- ...

And correct cast which block linux build.