Remove build & src parts from BuddyPress plugin basename

In case the trunk version or the git repo of BuddyPress are used, make sure the build & src parts are removed so that the root blog id is correctly set in multisite configs.

Fixes #5652

git-svn-id: https://buddypress.svn.wordpress.org/trunk@8433 cdf35c40-ae34-48e0-9cc9-0c9da1808c22