CGI directory logic fixed
Casting to int in mg_sprintf() call in handle_cgi
Disabling options if functionality is not enabled
page.lp -> dirscan.lp
bugfix: set the correct status if we still have pending data