Editing iPhoto-specific metadata
com.apple.metadata:kMDItemFinderComment is in binary property list format. Using xattr -p -l -x | tail +2 gives you just the hex dump of the attribute. You can then pipe that into xxd -r to turn that back into a binary file.

From there you can open that file in Apple's Property List Editor, assuming you have the Developer Tools installed. You can then edit the property visually.

You should then be able to reapply the edited value to the file using xxd -p -x and xattr -w -x.

This is all much more messy than one really wants for a single property that's just a string.