Create directories on demand

This is useful when the project needs to be cleaned with all the compiled files are removed.