Converting to Shane's method of state transitions.
Regenerating output files.
Ignore empty directories.