Also, to stop iPhoto opening, open iPhoto > Preferences, set 'Connecting camera opens' to 'No application'.