better way to ensure build directory in examples (creating on demand)