fix bug that should-build? failed at when output exists and input are
empty dirs.