Added missing import for TankError

TankError is used in the file but not imported.
This will trigger an error when for instance the folders for a task don't exist, so the context.as_template_fields() call fail and it tries to reach the except TankError part (line 97).