Updated test makefile to eb easier to read.
Updated permissions on test CGI programs
Fixed some errors with the usage of mg_stat()