ui: fix pgp/ssh key export

The vala code is expecting the directory parameter to be a reference
so when checking "directory != null" it dereferences directory first.

https://bugzilla.gnome.org/show_bug.cgi?id=707014