Fixed error checking in kenrel build wrapper.