upgrade syntax to rust 0.12

 * fix syntax error: range patterns require 3 dots now
 * use panic!() instead of fail!(): this was renamed
remove unused local variables