Adds mode.direction to getPinMode result

The setPinMode function sets the pin direction, but the current getPinMode function does not return the current direction. This change adds that functionality.