session: fix wrong error exit status for server threads for non-recursive file listings

https://github.com/perlundq/yajsync/issues/5
- fix issue where server exits with an error if doing a non-recursive
  file listing.
- fix issue where we would not exit with an error for non-existing
  modules.