Build fixes

Changes to the system for autogenerated code:

1. Program will create directory generated-source/ if it does not exist.
2. Will create test and source in one pass.