stream_file: network file system detection for Linux

Addresses issue #558 on Linux systems.

It looks pretty ugly, I know, but I looked around for a while and couldn't find a better way to do it. This is how it's done in coreutils (and this is basically the inverse of is_local_fs_type there).