bugfix: import sys and subprocess modules
features: added relative_git_path and outfile parameters