Divergencies in the Casimir energy for a medium with realistic ultraviolet behaviour