Added two optional parameters to sendemail; added test cases; fixed a bug when opening an attachment file that doesn't exist
Log parsing now looks for the last run only; fixed a bug with logging