exclude git files from archive
check for directory existence before chmod