git.py: moves fix_git_source() function

This function will also be used by the git update() function
that will be added.