Handle rmdir cmd on Windows properly.