File Descriptor validation Check

md5sum a.out
8a0a12abca0b36ca432d091714173da8  a.out

Added validation to incoming client file decriptor. During shutdown we
are given an invalid one so it's neccesary to catch it to not generate
warnings from the close call on the fd.

Either that or switch to polling, but for now this works and is
acceptable, although it does cause the server to block a bit which can
be annoying since I always have to do ctrl+c + ctrl+z to get it to
shutdown correctly, though that could be because I run it under
valgrind.