Implement at least some error handling for materials upload

This partially reverts 78e56248889313cf6357e824be6dd38d75ce5917 just to
make sure we are actually showing all error messages.  This results in
duplicates, but that's better than none.