Bugfix: do not assume inotify sends sane data

Found via Coverity
Bugfix: assignment in assertion, should be ==

Found via Coverity
bugfix: bad malloc len for rootdir pathname

Found via Coverity
Various pedantic/trivial fixups.

Not expected to be real bugs, just cases where clarity
  helps analysis and/or minor source-level fixups that
  have no real runtime potential.

Found during Coverity checks.