file_object_find(): opening mode is not necessarily O_RDWR.

This is a left-over of the change when fd->omode was introduced: we must not
check the kernel file descriptor for O_RDWR but for the actual permissions
used when the file was opened.