Factor out common security checks as includes.

This modifies the security checks module to make use of includes.  This will make it easier to add new security checks without duplicating code.  Also fixes a bug in the port scan test which made it scan a non-existent server.