Python3 version. Run this script at boot time to correct the pin settings on the 40 pin connector. All the 'special function' pins are set to special-function, and the gpio pins are set to GPIO.