Make presubmit work from any path.

This file is sometimes imported with the cwd somewhere else.
This should be an equivalent computation.

BUG=322205
TEST=locally fixes a git try workflow

Review URL: https://codereview.chromium.org/81633003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237877 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 237877