Fixes#22978
On some older installations the permissions for the userRoot and the
avatars are not correct. This breaks since we now use the Node API in
the avatar code.
This repair job makes sure that the permissions are set correctly.
* Unit tests added