Exit the main function after we executed the idle command

Signed-off-by: Philip Luyckx <philip.luyckx@gmail.com>
Update keyboard and mouse alive algorithm

Signed-off-by: Philip Luyckx <philip.luyckx@gmail.com>
Catch an race condition when checking the running processes

When a process is killed after getting its object instance from psutil,
but before we retrieve its name, an exception is thrown. Just catch the
exception and continue, the process is removed and thus handle it as if
it didn't ran.

Signed-off-by: Philip Luyckx <philip.luyckx@gmail.com>