Issues with the Lion (10.7)

I’ve created a script that works fine in Snow Leopard but for some reason fails in Lion.
The script creates a Growl notification when a file is added to the selected folder. The notification also includes the name of the file and a different notification if more than one file is added.

Here’s the script:

on adding folder items to this_folder after receiving added_items
try
set notification to “”
set fileList to (“”) as Unicode text
set notifyTitle to (“”) as Unicode text

	tell application "Finder"
		--get the name of the folder
		set the folder_name to the name of this_folder
	end tell
	set the item_count to the number of items in the added_items
	repeat with thisFile in added_items
		tell application "Finder"
			--get the name of the folder
			set the file_name to the name of thisFile
		end tell
		if the fileList is "" then
			set the fileList to the fileList & file_name
		else
			set the fileList to the fileList & return & file_name
		end if
	end repeat
	if the item_count is 1 then
		set notifyTitle to "New Item in your folder"
		set notification to fileList
	else
		set notifyTitle to "New Items in your folder"
		set notification to fileList
	end if
	
	
	tell application "System Events"
		set isRunning to (count of (every process whose bundle identifier is "com.Growl.GrowlHelperApp")) > 0
	end tell
	
	if isRunning then
		tell application id "com.Growl.GrowlHelperApp"
			register as application ¬
				"DW Files to Email" all notifications {"Added File"} ¬
				default notifications {"Added File"} ¬
				icon of application "Finder"
			
			notify with name "Added File" title notifyTitle description notification application name "DW Files to Email" icon of file this_folder sticky yes
		end tell
	end if
	
end try

end adding folder items to

Any ideas?

Hi,

this works on my machine (with Growl.app from the App Store)


on adding folder items to this_folder after receiving added_items
	try
		set fileList to {}
		--get the name of the folder
		tell application "Finder" to set folder_name to name of this_folder
		
		set item_count to count added_items
		repeat with thisFile in added_items
			tell application "Finder" to set end of fileList to name of thisFile
		end repeat
		set saveTID to text item delimiters
		set text item delimiters to return
		set notification to fileList as text
		set text item delimiters to saveTID
		set notifyTitle to "New Item" & item (((item_count > 1) as integer) + 1) of {"", "s"} & " in your folder"
		
		if application "Growl" is running then
			tell application id "com.Growl.GrowlHelperApp"
				register as application ¬
					"DW Files to Email" all notifications {"Added File"} ¬
					default notifications {"Added File"} ¬
					icon of application "Finder"
				
				notify with name "Added File" title notifyTitle description notification application name "DW Files to Email" icon of file this_folder sticky yes
			end tell
		end if
		
	end try
end adding folder items to