better build/ directory handling