Eu mudei o script para
tell application "Finder"
try
return (POSIX path of (target of front window as alias))
on error error_message
beep
end try
end tell
e criou um script bash
#!/bin/bash
cd "'osascript ~/Scripts/cdf.scpt'"
e criou um alias bash
cdf='. ~/Scripts/cdf.sh'