Fix auto-generation

This fixes the issue with auto-generation triggering only on files in ```source``` directory and not subfolders. 

Seeing how there have been multiple issues with auto-generation the last couple of weeks I would very much like this to be tested thoroughly before introducing a new bug.