correctly used cwd for subprocess
path.rmdir -> rmdir