Add a script to receive mail via pipe.

Also, fix n00b mistake in header parsing.