Fix 'TypeError: Arguments to path.join must be strings' when uploading new avatar