Fix makefile error if bin directory exists
Clean up libgit resources