editor-workspace: memorize last directory

When choosing a file to open, memorize the directory from where the
last file was opened and open this directory instead of "Recent" one.

https://bugzilla.gnome.org/show_bug.cgi?id=741870
style cleanup
editor: use g_path_get_dirname() instead of dirname().

Dirname has side-effects which are non-obvious, so I'd rather just
use g_path_get_dirname(). Thankfully, both of these functions actually
seem to work okay on URIs like ssh:///foo/bar.