test if root directory in a more cross-platform way