Added ioctl stuff, writes to lcd not through ioctl

Made some changes to the way that the file is accessed, also made a
first attempt at locking so that only one process can write at a time