core.py: added package-definition method `get_build_directory`

This is intended to provide a more consistent method for getting
build-directory paths from the package definitions.