remove duplicate context menu entries

Fixes atom/tree-view#131 and refs #2601.

I was unable to reproduce #2601 but this may fix the problem in general. atom/tree-view#131 occurs when disabling the Tree View package, re-enabling it, and then context clicking in the Editor pane.
What do you think about checking the length of the array instead of `[1]` being undefined?