Crude oil futures ended higher, reversing losses earlier in the week after news that U.S. crude inventories fell sharply.