Check $! after Dir.exists? returns false.

When `Dir.exists?` returns false, no exception should be thrown, and `$!` should not be set. See also https://jira.codehaus.org/browse/JRUBY-7134.