pathutils: Fixed pathutils functions.

g_file_test flags has an "or" relation instead of the incorrectly
assumed "and" relation. Wrote a unittest, too.

Signed-off-by: Viktor Tusa <tusa@balabit.hu>