Fix crash if AI doesn't own a capital.
Merge changes from master.
Change output directories so it doesn't collide with master branch.