close dir opened with opendir() - fixes accumulated fd for plugin state saves