After debugging this issue, the correct fix here is to replace `and` with `&&` to keep the nil check and not treat the assignment of `is_a_directory` and `@resource.stat.directory?` as two different statements when using `and`.  With `and`, `is_a_directory` gets assigned to `@resource.stat` (a File::Stat object), which will be treated as truthy in `symbolic_mode_to_int` which is expecting a boolean.