[gcc] Use os.rename instead of shutil.move (dangerous side-effects)