GPIO.gpio_function() Fix

I noticed that the gpio_function was not quite implemented properly making it impossible to check the current in/out status of a bit.  It has been corrected and added to the unit testing in this version.