Dir.exists is replaced by File.directory for Ruby 1.8 compatibility (fix jhs/build-couchdb#24)