Core: don't allow `build` or `src` in `basename` in `BuddyPress:setup_globals()`.

Fixes problems with activation hooks.

This change is needed as result of the trunk re-organisation caused by the adoption of Grunt. See #5160


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