Apple Script Error

Good morning everyone. I'm trying to create a hazel automation to change a new folder image. I found an apple script on the Automators forum that asks for a icon and folder location. This works on my machine. I modified the script so it has a fixed icon to use and takes thefile parameter in hazel. When I run the modified script in hazel I get an error.
The script is as follows:
set iconFolder to (path to home folder as text) & "Dropbox:cllc:icons:yosemiteICNS" -- Location of your icns files
set icon to (path to home folder as text) & "Dropbox:CLLC:Icons:YosemiteICNS:Book Bottom.icns"
set Destination to theFile --choose folder with prompt "Please choose the Folder to change "
set destPath to POSIX path of Destination
set sourcePath to POSIX path of icon
set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath)
(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)
The error hazel gives is:
NSImage doesn't understand the "alloc" message.
Any help would be greatly appreciated. Seems like I am so close but so far.
The script is as follows:
set iconFolder to (path to home folder as text) & "Dropbox:cllc:icons:yosemiteICNS" -- Location of your icns files
set icon to (path to home folder as text) & "Dropbox:CLLC:Icons:YosemiteICNS:Book Bottom.icns"
set Destination to theFile --choose folder with prompt "Please choose the Folder to change "
set destPath to POSIX path of Destination
set sourcePath to POSIX path of icon
set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath)
(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)
The error hazel gives is:
NSImage doesn't understand the "alloc" message.
Any help would be greatly appreciated. Seems like I am so close but so far.