Fix updating users' avatars

Bugtracker: http://www.concrete5.org/developers/bugs/5-6-1-2/562rc1-error-updating-an-user-avatar/