title: Chef - Dir.exists? guard treating symlink as directory
body: <p>I have a recipe which deletes an empty logs directory, then replaces it with a symlink in the next step. </p>
  
  <pre><code>directory "#{ENV['GS_HOME']}/logs/" do
    action :delete
    only_if { ::Dir.exists?("#{ENV['GS_HOME']}/logs/") }
  end
  </code></pre>
  
  <p>It works the first time around but on the next chef-client run when it should not delete the item which is now a link to another directory, I receive an error:</p>
  
  <pre><code>Errno::ENOTDIR
  --------------
  Not a directory @ dir_s_rmdir ...
  </code></pre>
  
  <p>Why does the guard appear to treat the link as a dir and not skip, but then the resource action recognizes it correctly, not as one, and fails? What is the best way around this?</p>