Fix window rename for dirs with spaces.