Added base module in/out build events (fixes #1)