HAL: misc bugs fixed, wrapper for Linux SysFS GPIOs added (untested)