[build] Enable make distclean
[build] configure depends on configure.ac instead of configure.in
[fix] NULL dereference if program name is not given in argv[0]. Better safe than sorry
[fix] Change pointer to reference in some functions (we can avoid null pointer dereferences simply by using references)