Fix for source tarballs error on 'set-version' (not a git repository)

The current source tarballs fail to build when the 'set-version' task wants to obtain the version number through git.
This fix attempts to avoid this, using the package.json version when no .git directory is found in the root of the sources.