Preserve pwd if rmdir fails