Added partial support for email and file save

Added working but unpretty support for sending output to an email
address and/or for saving the output to a text file.