Time to generalize the image script to handle
multiple stages.
proper tmp dir handling