safer git version retrieval and better version parsing of graphviz version