On the target:
root@swi-mdm9x14~# microcom -E /dev/ttyAT
at+wiocfg?
+WIOCFG: 2,16,0,0,1,0,0
+WIOCFG: 6,16,0,0,1,0,0
+WIOCFG: 7,16,0,0,1,0,0
+WIOCFG: 8,16,0,0,1,0,0
+WIOCFG: 13,16,0,0,1,0,0
+WIOCFG: 21,16,0,0,1,0,0
+WIOCFG: 22,16,0,0,1,0,0
+WIOCFG: 23,16,0,0,1,0,0
+WIOCFG: 24,16,0,0,1,0,0
+WIOCFG: 25,16,0,0,1,0,0
+WIOCFG: 28,0,0,0,1,0,0
+WIOCFG: 29,0,0,0,1,0,0
+WIOCFG: 30,0,0,0,1,0,0
+WIOCFG: 31,0,0,0,1,0,0
+WIOCFG: 32,16,0,0,1,0,0
+WIOCFG: 33,16,0,0,1,0,0
+WIOCFG: 34,0,0,0,1,0,0
+WIOCFG: 35,0,0,0,1,0,0
+WIOCFG: 36,0,0,0,1,0,0
+WIOCFG: 37,0,0,0,1,0,0
+WIOCFG: 42,16,0,0,1,0,0
OK
at+wiocfg=35,16
OK
Now reboot and try your program again. I believe that GPIO is actually connected to the low power microcontroller on inside of the WP module. The above AT command gives ownership of the GPIO to the Linux CPU. You should just need to do this once.