Improve compatibility with develop.svn.wordpress.org unit test suite

This changeset ensures that the BP tests can be run from within a
develop.svn.wordpress.org setup. Backward compatibility for custom locations
using the WP_TESTS_DIR environment variable is maintained.

Fixes #5200

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