Redirect stderr for git rev-parse

If not in a git directory the git warning messages will be printed.
These warnings shouldn't be shown to users and can make things
confusing.

Change-Id: I6b872a7407141edeed33ac6157022743a2919f6d
Merge "Redirect stderr for git rev-parse"