treewide: refactor terminal access

Implement some abstraction so that later we can avoid
unneccessary complications with different types of terminals.

Signed-off-by: Levente Kurusa <levex@linux.com>
Makefile: URGENT fix

Otherwise we would also corrupt .git folder!

Signed-off-by: Levente Kurusa <levex@linux.com>