pull script now imports stackage
Tolerate source encoding errors by replacing with Unicode replacement char.
More robust exception handling. Not too neat though.