Trouble with getting shell script working in Hazel

Works fine when run in terminal. (PDFjoin is a symbolic link to /System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py)
The result is test.pdf, which is CoverPage prepended to getstarted_guide.pdf (or more technically accurate, getstarted_guide appended to CoverPage.pdf).
Command is PDFjoin -o Outputfile Inputfile1 Inputfile2
In Terminal this works perfectly.
PDFjoin -o "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/Done/test.pdf" "/Users/Me/Documents/~Automated Folders/CoverPage.pdf" "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/getstarted_guide.pdf"
Using the following in Hazel as embedded script results in the test.pdf having the cover page and just a blank page appended.
PDFjoin -o "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/Done/test.pdf" "/Users/Me/Documents/~Automated Folders/CoverPage.pdf" $1
Ultimately I need something like below, so that the resulting files have the same names as the input files. But this doesn't produce any output files.
PDFjoin -o "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/Done/"$1 "/Users/Me/Documents/~Automated Folders/CoverPage.pdf" $1
The result is test.pdf, which is CoverPage prepended to getstarted_guide.pdf (or more technically accurate, getstarted_guide appended to CoverPage.pdf).
Command is PDFjoin -o Outputfile Inputfile1 Inputfile2
In Terminal this works perfectly.
PDFjoin -o "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/Done/test.pdf" "/Users/Me/Documents/~Automated Folders/CoverPage.pdf" "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/getstarted_guide.pdf"
Using the following in Hazel as embedded script results in the test.pdf having the cover page and just a blank page appended.
PDFjoin -o "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/Done/test.pdf" "/Users/Me/Documents/~Automated Folders/CoverPage.pdf" $1
Ultimately I need something like below, so that the resulting files have the same names as the input files. But this doesn't produce any output files.
PDFjoin -o "/Users/Me/Documents/~Automated Folders/Add Cover Page to PDFs/Done/"$1 "/Users/Me/Documents/~Automated Folders/CoverPage.pdf" $1