Fix up the Makefile, add clean, install, check targets

The executable name can now by changed with TRGT, the SRCS array now
includes every file except i_opndir.cpp (which is unneeded on POSIX
platforms), and there is now an install target which supports the
standards PREFIX and DESTDIR variables commonly seen with Autotools
projects. The "make clean" target is capable of removing all the
objects.

Additionally, there's a big chunk of a BADFUNCS check for
commonly-exploited or misused C functions.