There are two Applescript scripts here that might be mildly useful to you.
The first, “Find Homeless Photos” will look through your iPhoto Library and locate all the photos that are not in an album. It then adds those photos to a new album so they’re easy to put where they belong.
The second is less generally applicable. “Remove Junk from Archive” is meant to be called as part of a Mail.app rule. It takes a message that has been flagged as junk and removes it from an archive. I find it useful because I automatically archive all of my incoming mail using procmail, but spam that is found in the Inbox by Mail.app will remain in the archive. This script takes care of that.
Enjoy!
-Darrell Fuhriman