Change regex to only match .git rather than .git*.