fsck: replace if-statements to logical expressions in fsck_tree()

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.

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

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

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