Update generatefiles.rst

Wrapped the resource generation with `Def.task`.  Otherwise this example does not compile.
Merge pull request #1151 from schmmd/patch-1

Update generatefiles.rst