Check for presence of existing avatar

If a contact already has an avatar, do not update it. Also improvements for robustness of app.