Output is now done via stdio, instead of with my stupid homegrown
buffering (I don't even know why I did it that way in the first
place). Also, from Johan Karlsson <johan@freebsd.org>, eliminate a
spurious newline if no output was generated, and link stat(1) to
readlink(1) for similarity to OpenBSD.