Fixing the e-mail glitch

Previously the script would crash after sending an email.  We’ve
resolved this by following ryansb’s advice and putting the emailing
code in a separate process.