gpio_relay: clean-up some bits

* ensure gpio is an int
* nicer argument flags