Don't try to open directories as files from sidebar

Console was filling up with tracebacks due to trying to open directories as files in the editor. Don't know if this is the best way to do this.