Graceful exit 32bit (Issue #336)

re-submitting bill's PR with my fixes on top.
I've rebased his work and mine.

Closing his PR, to continue working on this one.
yes, this line is very useful when users submit emails with terminal output.