Use the value from $EDITOR instead of using '$EDITOR' as a command

The following:

```python
s = subprocess.Popen(['$EDITOR', 'foo.txt'])
```

won't expand `$EDITOR` to its value so I used the value of the environment
variable as the default editor. If the variable is not set it will fall back to `vim`,
which is available in every modern UNIX so its unlikely to cause trouble.