[externaltools] Fix running tool without open documents

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