This second clause doesn't need to check for `odir.exists()` because the previous clause ensured that. This also may be better expressed as `if !odir.is_dir()` to catch more things other than files (pipes, sockets, etc).