Fix Ctrl+D Crashes and Freezes (#296)

Cleaned version of https://github.com/p-e-w/finalterm/pull/306
I agree. The tempfile definitely needs to go and be replaced with a completely in-memory solution (although it kindof already is on distros that mount `/tmp` as a tmpfs).