Running *nix commands in embedded script

I'm having problems getting system commands to execute in an embedded shell script. For example, if Hazel detects a DJVU file in a folder, I want it to execute "djvu2pdf $1". However, I always get an error (status code 127 which, I think, means the shell command can't be found). If I manually execute "djvu2pdf [filename]" in Terminal, it works as expected, since djvu2pdf (and all other system commands) are in directories in $PATH.
I managed to get a command working by installing it to the folder Hazel is monitoring, but this isn't a solution.
How can I get Hazel to detect and run shell commands?
Cheers.
I managed to get a command working by installing it to the folder Hazel is monitoring, but this isn't a solution.
How can I get Hazel to detect and run shell commands?
Cheers.