Upgrade selenium to 2.40.0.

See #43 for details.