Fixed the return value of fetchKeys in case of errors

``listKeys`` expects to always receive an array with ``keys`` and ``dirs`` in it. Otherwise, it throws a notice