Fixed build error, typo, etc...
Close temp input file immediately after write content done
  If not, gpg will get empty input.
remove --no-tty option of gpg to avoid the following error
  "gpg: Sorry, no terminal at all requested - can't get input"
Preparation for rewrite message.c to add more function