Fix the ExtractFolder method returning an empty tuple.
Improve 'git' command handling.