Odd, I am running on Mavericks. Ok can you try defining the function just above it: 
    update_terminal_cwd () 
    { 
        local SEARCH=' ';
        local REPLACE='%20';
        local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}";
        printf '\e]7;%s\a' "$PWD_URL"
    }

If that works I will add a comment there linking to this snippet. Found other people having the same problem when I googled it. But this should solve it.