Improve fileno example

Quoting from the fileno section of this document:

"[...]  If there is no real file descriptor at the OS level, as can
happen with filehandles connected to memory objects via "open" with a
reference for the third argument, -1 is returned."

Update the example to cater for this situation. Thanks to
Niels Thykier for the suggestion.

Bug-Debian: http://bugs.debian.org/706749