The REP_DIR variable does not remain consistent when importing from other repositories. Fixes #1888
Issue #1082
This patch changes the top-level directory layout as a preparatory step for improving the tools for managing 3rd-party source codes. The rationale is described in the issue referenced below. Issue #1082