Add Daniel Wagner's post-receive-email.hook (plus changes from upstream