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>
Merge remote-tracking branch 'talien/f/pathutils-is-dir-fix'