Create directories on demand

This is useful when the project needs to be cleaned with all the compiled files are removed.
Merge pull request #7 from kenhkan/create_dir_if_missing

Create directories on demand