ubuild: properly call pre/post executables and setup the build_image environment