Updated compatibility to Ruby 2.0.0, using rexical instead of the rex gem. Backwards compatible with 1.8.7 and 1.9.3