Fixes #130

Fixes non-null intermediates_dir failure.