Using system('tty') will always report "not a tty", since the spawned shell
has stdin redirected. In order to get an accurate value for $GPG_TTY when
it's not already set, read the output of the tty command using :!.
This requires a bit more setup/teardown to ensure the buffer and user's undo
state aren't affected, but it's the only way to accurately determine the
user's tty.
Closes: #1
Signed-off-by: James McCoy <vega.james@gmail.com>