Add compatibility for wgUploadDirectory to UserMiniAvatar
The old solution ignored wgUploadDirectory, it alway used default ($IP). With this patch BlueSpiceAvatars will take care of wgUploadDirectory.
Needs cherry-pick to REL1_31
Change-Id: Ib722fec233486f0b140493415ca11bd5c20f00a4