make buildtest fail on error

closes #607