Reverse optimize/generate order

Generator has to be run before compiled.php is created.
Merge pull request #130 from barryvdh/patch-1

Reverse optimize/generate order. Good call. Thank you!