Add missing attachment argument (-a) to mailx example program. Add a check to prevent caller from using a NULL file path or file name when sending an attachment.