Twos complement fix

Twos complement from the registry aren't calculated correctly, so negative currents aren't reported correctly.
Added a twos complement function.
Strongly inspired from Faraday's solution here (page 2) :
http://forums.adafruit.com/viewtopic.php?f=8&t=36007&sid=060ac58ccafc212e750