libc_lock_pipe: implement F_GETFL 'fcntl()' command

Fixes #622.