Having run it on the Pi, there were a couple of bugs.

Fix issue with setting values (must be (int) 1)
Fix path looking for writable GPIO
Add code to allow unsetting pin.