1) Wherever your bbPress theme is, add a functions.php. eg. my-templates/MY-BB-THEME/functions.php… if you’re using Kakumei, then it would be /bb-templates/kakumei/functions.php.
2) The path has to be an absolute filepath and not a URL. eg. /var/www/wp-content/uploads/avatars/. I’ve tried to guess where your WordPress install is using $_SERVER, but you might need to adjust this for your particular install.