Unable to Upload Avatars- BuddyPress

I am having this problem of uploading Avatars with BuddyPress. The version of Wordpress I am using is 3.01. The installed version of wordpress is in a subdirectory of the domain, so its http://www.example.com/blog/wordpress-install.

I have tried to change the permissions to 777 but I still get the error message: Upload Failed! Error was: Unable to create directory /avatars/1/. Is its parent directory writable by the server?

Can anyone please assist with this problem?