scripts: check.sh: Don't use git rev-parse
scripts: check.sh: Don't use git rev-parse

Don't use git rev-parse, so that the script can be used also when the
source tree is not a git repository. Also, do some minor cleanups.

Signed-off-by: Jere Leppänen <14957520de8d9815e0c353a07fe23c737f0171e9@nokia.com>
Reviewed-by: Tuomas Taipale <d030d77d5671b12fc82a6b4397d4c4cdb188b540@nokia.com>

OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp,OpenFastPath/ofp