Refs #10, adds better error reporting for uploading avatars in update-user.

There is now an error message if $_FILES['avatar'] is set but was
uploaded with an error. There is another error message if the mimetype
of the file is not image/png.