Fix git rev-parse for certain cases

Without this, npm2nix would fail for, for example, parsoid with git rev-parse error.