Direct evidence of gas-induced laser beam smoothing in the interaction with thin foils