def chdir(self, new_pwd, relative=True):
if new_pwd and self.pwd and relative:<EOL><INDENT>new_pwd = os.path.join(self.pwd, new_pwd)<EOL><DEDENT>self.pwd = new_pwd<EOL>
Parameters
----------
new_pwd: str,
    Directory to change to
relative: bool, default True
    If True then the given directory is treated as relative to the
    current directory