def __setup_remote_paths(self):
self.logger.debug("<STR_LIT>", self.remote_wd)<EOL>self.logger.debug("<STR_LIT>", self.remote_exe)<EOL>self.logger.debug("<STR_LIT>", self.files_to_upload)<EOL>if self.args.module:<EOL><INDENT>self.logger.debug(<EOL>'<STR_LIT>', self._generate_pipes_code()<EOL>)<EOL><DEDENT>if not self.args.pretend:<EOL><INDENT>hdfs.mkdir(self.remote_wd)<EOL>hdfs.chmod(self.remote_wd, "<STR_LIT>")<EOL>self.logger.debug("<STR_LIT>", self.remote_wd)<EOL>pipes_code = self._generate_pipes_code()<EOL>hdfs.dump(pipes_code, self.remote_exe)<EOL>self.logger.debug("<STR_LIT>", self.remote_exe)<EOL>hdfs.chmod(self.remote_exe, "<STR_LIT>")<EOL>self.__warn_user_if_wd_maybe_unreadable(self.remote_wd)<EOL>for (l, h, _) in self.files_to_upload:<EOL><INDENT>self.logger.debug("<STR_LIT>", l, h)<EOL>hdfs.cp(l, h)<EOL><DEDENT><DEDENT>self.logger.debug("<STR_LIT>" %<EOL>('<STR_LIT>' if self.args.pretend else '<STR_LIT:U+0020>'))<EOL>
Actually create the working directory and copy the module into it.

Note: the script has to be readable by Hadoop; though this may not
generally be a problem on HDFS, where the Hadoop user is usually
the superuser, things may be different if our working directory is
on a shared POSIX filesystem.  Therefore, we make the directory
and the script accessible by all.