Do chdir within mktargets.py

This simplifies the calling shell script.