Fix build, save files atomically, and quit on Ctrl-Q

This fixes #16, #28, and #32.
It didn't seem necessary, and I was playing around with ways to avoid the unsafe code.