There's another pull request, #4382, with a competing version of essentially this same function.  They should probably be reconciled.

But -- I question whether we need to bother doing this here.  It feels outside the scope of the work a bit.  No other means of opening a file (File > Open, clicking in project tree, etc.) filters out binary files; they all just error out.  Is there a reason this one gesture needs to be different?  It seems odd to make it inconsistent -- IMHO we should either filter where they all bottleneck (the core FILE_OPEN command) or not at all.