moved settings to seperate file in hooks folder, change umask before writing file

Setting the umask manually is necessary because the shell in that e.g. gitosis
runs the hook has no normal environment set, also no umask. On Gentoo this
leads to files being created that have to read permissions for the webserver.