Also, have you looked at Automator? I am not in front of my mac right now, but IIRC Automator should be able to handle all of that pretty easily. And you can attach it to a folder to use as a Folder Action script.
Also there are some example AppleScripts in the AppleScript folder which show some finder/folder examples. This may give you some help too.
I have taken a small look. I am actually planning on using automator for part of the mast action I am creating. I'm just trying to break it down into single actions for now, so I can wrap my head around it.