Use python to run commands

system() causes buffered keypresses to be echo'd, annoying when things are
slow.
Fix shell escaping for buffer contents
Support buffer contents for new files