Fix range-based for loops for Material
muse: make path handling cross platform