PathUtil
Small string-path helpers shared by Build and Assets. These deliberately avoid the stdlib Path.dirname/Path.extension/Path.strip_extension helpers, which crash at runtime on a Some(0) literal pattern; until that stdlib bug is fixed we compute the pieces directly here.
All functions BORROW their String arguments (they only read + concatenate) and return freshly-allocated results, so callers can use the inputs again.