default.rb: use ruby builtins to check directories/symlinks

the test command spawns a shell, which is slow
and it breaks my chefspec, because it requires to mock commands.