zero'ed out the pixels on terminate and other small changes

Set the pixels colour state to 0,0,0 on exit to "switch off" the pixels
Declared a couple of function at the top of the file (It really needs a header file)
Changed the fatal() function on /dev/mem open to printf();exit(); to prevent a segmentation error