made script work on git submodules, and from anywhere in the path