Add gitdir option and fixes some dependency build order

Commit e75803399bbf3dc762eddea98a9969dde904c049 broke the build as taglib requires autotools.
Fix executable bit