fixes #39. Clicking a file activates an open tab if possible, else the
file is opened.