Fix bug, wrong variable used.

The variable should be `blendfile` not `scriptfilename`.