Hurricane Ernesto wreaks havoc on Bermuda before heading north