try / except on listdir
more bugfixes, api tweaks