Fix missing UBUNTU_RELEASE environment variable

That patch recovers broken ubuntu image for image provisioning.
Additionally introduces few failure checks at build time.

Change-Id: I94b24d169a12f80fe7554ad8273e9ae25d7518e6
Closes-Bug: #1391217
Merge "Fix missing UBUNTU_RELEASE environment variable"