build/core: Fix build errors

- Include task hooks only if they exists
- Fix typos

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>