RepoHook: set __file__ when running the hook
RepoHook: set __file__ when running the hook

A common design pattern is to use __file__ to find the location of the
active python module to assist in output or loading of related assets.
The current hook systems runs the pre-upload.py hook in a context w/out
that set leading to runtime errors:

$ repo upload --cbr .
ERROR: Traceback (most recent call last):
  File ".../repo/project.py", line 481, in _ExecuteHook
    self._script_fullpath, 'exec'), context)
  File ".../repohooks/pre-upload.py", line 32, in <module>
    path = os.path.dirname(os.path.realpath(__file__))
NameError: name '__file__' is not defined

Define this variable in this context so code can safely use it.

Change-Id: If6331312445fa61d9351b59f83abcc1c99ae6748

chenzilin/git-repo,wavecomp/git-repo,jingyu/git-repo,lewixliu/git-repo,couchbasedeps/git-repo,chenzilin/git-repo,aosp-mirror/tools_repo,GerritCodeReview/git-repo,jingyu/git-repo,dodocat/git-repo,TheQtCompany/git-repo,lipro-yocto/git-repo,qioixiy/git-repo,GerritCodeReview/git-repo,TheQtCompany/git-repo,lewixliu/git-repo,gabbayo/git-repo,11NJ/git-repo,mer-tools/git-repo,codetutil/git-repo,couchbasedeps/git-repo,chzhong/git-repo,dodocat/git-repo,testbetta/git-repo-pub,aosp-mirror/tools_repo,nuclearmistake/repo,wavecomp/git-repo,testbetta/git-repo-pub,qioixiy/git-repo,frogbywyplay/git-repo,gabbayo/git-repo,codetutil/git-repo,chzhong/git-repo,11NJ/git-repo,frogbywyplay/git-repo,lipro-yocto/git-repo,nuclearmistake/repo,mer-tools/git-repo