OS X: Specifying custom command line invocation of program as application for opening files on double click
To my knowledge, there is nothing to automatically run any script on double-script (I am most likely wrong). The best solution I've found is Automator. It's preinstalled. You want  to create a service, which will place scripts into a context menu (right-clicking on file). For your actions, you want to find the action "Run Shell Script". From there, you can have it receive input from Finder, such as file paths and directory paths. If you pass input to stdin, the variable you will use in the shell script is $@.

if [[ ! -d "$@" ]]
then
    emacsclient -c -a "" $@;
    exit
fi


I do not know if that script is entirely correct, but it should put on you the right track.