the cgi-bin dir for the "primary" ibay can be found at
/home/e-smith/files/primary/cgi-bin
but to experiment with you should probably create an ibay and enable the option to allow "Execution of dynamic content (CGI, PHP, SSI):" for that Ibay. You can then call cgi-scripts from the cgi-bin for that ibay. The path to the cgi-bin would then be
/home/e-smith/files/ibays/ "ibayname" /cgi-bin