Is it a good idea for an international student to use his master's thesis preprint as his writing sample?
Yes.  If an applicant to a doctoral program has written a master's thesis, it will be assumed that the thesis is the applicant's best work.  Therefore admissions committees will expect to receive the thesis as the writing sample.  If your thesis is long, you may wish to send a polished excerpt; the expected length may be field dependent.