Add test cleanup code to edit_test

ENV['EDITOR'] previously wasn't backed up by test setup.
Ignore .ruby-version
test RemoteInterface

- add tests for RemoteInterface#read_command
  - indirectly tests RemoteInterface#readline
- add tests for RemoteInterface#close
  - indirectly tests Interface#errmsg
- add tests for RemoteInterface#confirm
  - indirectly tests Interface#confirm