create output directories before writing .o files