Please create a test for when cwd is None, and when it's not None.