Added gpio_request

Now calls gpio_request to make sure that the pin is owned.
Original patch from John Herbst. I reworked it slightly.