Bugfixes in GPIO

I discovered this issue while trying to use P9_31, which was incorrectly labeled as power/ground (-1). I've corrected the GPIO pin tables. The checking against using -1 in iolib_setdir also made an unsigned comparison which always passed even in the argument was -1 (because it showed as 255).