Thanks all, problem solved. Jean-Pierre was right, the problem is explained in TextMate's manual. A shebang command (like a ruby command) in TextMate does not read the path set in .bash_profile but relies on the path for GUI's which is set in ~/.MacOSX/environment.plist
So I opened this file and shifted at the beginning of the path the "/usr/local/bin" piece, and now everything works. Btw, appscript is great.
This is maybe the third time I fall into this trap...
Thanks a lot Piero
PS we have trolls! at last! we are a grown-up community