[Fix #81, fix #82] Add flycheck-root-directory-p

Determine if a directory is the root directory in a more
platform-neutral way, to fix endless recursion on Windows [#81].
Add tests for `flycheck-root-directory-p'