Fixed up some silly errors in my encryptMail function and added some dependency checking. Additionally implemented this stuff in the signMail function.