I thought I was done with all this, but then I went back to Firefox to 
close out some tabs and took a look at this:

http://www.linuxquestions.org/questions/programming-9/discovering-script-directory-path-531088/

I think I sent that URL to the list earlier.  I think that web page was 
where I got some of my incorrect ideas, such as:

      For example, by issuing

      ../../my_script

      the result of "dirname $0" will be

      ../..

That is certainly false wherever I have tried it.  Is it *ever* true or 
was the author just deluded?  (As I was!)

Then there is the claim that in bash, all external commands (e.g., 
dirname) can be avoided using this tactic:

    case $0 in
       */*) EXEC_DIR=${0:%/*} ;;
       *) EXEC_DIR=$PWD ;;
    esac

Does that ever work?  I think the problem is more than just missing 
quotes.  It gives me this error:

0: %/*: syntax error: operand expected (error token is "%/*")

Strangely, on that LinuxQuestions.org page, I didn't find anything that 
really worked for me despite the fact that the writers there seem to know 
a lot about bash scripting.

Mike