Stay away from the shell script for now as I never finished writing it as I did not have the required knowledge to do it properly. Hence why you got so many errors.

Hmm, it seems a post I sent last week about directory location was lost.

you may want to try
-Fi~/marcio/JEDI-SDL/*/Pas

-Fu~/marcio/JEDI-SDL/*/Pas

just to be sure that it's picking up the "home" dir correctly.