Makes path flattening consistent.