core.py: add support for pre_build_scripts in cores

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>