fixed broken gitlab version determination during backup

If the backup directory is not sub the gitlab install directory,
then the git rev-parse call will fail.
Merge pull request #3688 from amacarthur/rake-fix

fixed broken gitlab version determination during backup