Raise an exception when commands returns non-zero.

Check existence of a git repository before creating archive.
Automatically detect toplevel directory of the repo.
Fix exception is raised if global attributesfile does not exist.
Increment version.