Attempt to change to root dir before executing python script

When inside a git repo, attempt to change to the root dir
before running python script. Prevents a bunch of errors
when mktargets.sh is executed from the wrong dir.
Merge pull request #588 from varunbpatil/root_dir

Attempt to change to root dir before executing python script