Computer simulation of self-avoiding walks: Testing the scanning method