Add quotes in variable check for EDITOR

This avoids errors if there are spaces defined in this environment
variable.