def rm_rf(path)
FileUtils.remove_entry_secure(path) if path && File.exist?(path)
rescue ArgumentError
message = "It is a security vulnerability to allow your home directory to be world-writable, and bundler can not continue.\nYou should probably consider fixing this issue by running `chmod o-w ~` on *nix.\nPlease refer to http://ruby-doc.org/stdlib-2.1.2/libdoc/fileutils/rdoc/FileUtils.html#method-c-remove_entry_secure for details.\n"
File.world_writable?(path) ? Bundler.ui.warn(message) : raise
raise PathError, "Please fix the world-writable issue with your #{path} directory"
end