build.py: Fail when ant process fails

- Use check_call to raise CalledProcessError if somethig goes wrong
- Use a for loop instead of map()