For a new_resource id is returned to be nil. So ignoring the check for null. Also the -notrunc is deprecated. moving it to --no-trunc.
Merge pull request #157 from ageekymonk/master

container/image id is given as nil.