Fix the IOCTL handling

In the previous patch I blamed the kernel for misbehaviour, but actually
not the kernel was wrong. Enigma2 messed things up. I added a fix for lircd
devices to be handled as remotes.

Signed-off-by: Christian Ege <k4230r6@gmail.com>