Implement GPIO cmd, more fixes

Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>