correctly deduce absolute CORE_DIR path
details and TODO