I've looked into this a bit more and now realise that the code to check folder locations isn't a good way to go anyway, since EasySocial at the back end settings allows for you to select any location as the avatar base folder (for which it then creates a user subfolder), so to make sure things are fool proof you need to be checking the database to find what that location is set to (I believe it's in table _social_config)