Fixed come problems with Ctrl-o, file-open-by-name:
- Don't insert non-plain characters.
- Do something reasonable when the user has selected text.
  This is an edge case unless the selection extends to the end of the text.

Leo build: 20140919071842