Refactor the Bundle Packager to be more testable (#344)

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>