fsck: replace if-statements to logical expressions

There were two different ways to check flag values,
one way is using if-statement, and the other way is
using logical expression.

To make sensible, replace if-statements to logical expressions
in fsck_tree().

When checking "has_dot" and "has_dotdot", use is_dot_or_dotdot()
instead of strcmp() to avoid hard coding.

The is_dot_or_dotdot() is used to check if the string is
either "." or "..".

Signed-off-by: Hiroyuki Sano <sh19910711@gmail.com>
wip
wip