a more generic way of handling separator by escaping it regardless of
whether it's a \ or a /
improves the ante-previous commit