Add test for CGI exec directory

Test code for Issues/#338.
No fix code.