return error code on exit status, if build failed

Signed-off-by: Kalle Lampila <kalle.lampila@ixonos.com>
Merge pull request #34 from kallelampila/master

return error code on exit status, if build failed