escape bash whitespace with pipes (shlex in python 3.3). rename window