Use failonerror attribute in exec tasks

Fix for #168.