lib/cli: Make notmuch_database_get_directory return a status code