better handling of overwriting when uploading to catalog

Fixes #74 and #75

Includes some code cleaning as well
documented overwrite behaviour and config option for overwriting on group import