Updated buildscript.
Added some checks to container creation.