git_pillar: fix/cleanup imports

* add missing imports
* rm unused imports
* improve organization of imports
* rename local var to avoid shadowing