Fix opening a directory from CLI with emacs

This fixes #508.
A bug presences cos emacs `startActions` takes into account only buffers with `Right` ident attribute and a directory buffer has `Left` type. So after opening a directory there are 2 buffers simultaneously with `*scratch*` buffer opened by default.