To elaborate on what
kwoff said:
Some web servers are set up to attempt to
execute any file located in the cgi-bin directory. In that case, you'll have to put any images under your normal HTML directory, then (as
kwoff mentioned) reference them in your script from your document root (or with a full URL).
Impossible Robot