Update update-directory-index.sh

Simplify grep function and ignore .git folder
Update update-directory-index.sh

do not create an index.html file on .git folders
Merge pull request #1 from bubuntux/gh-pages

Update update-directory-index.sh as suggested in pull request #1 by bubuntux.