Introduce const.dirsep and use it in tests

Simply add `$(const.dirsep)` equivalent to the platform's directory separator.  Parallels `translatepath`; mainly useful for tests.

Suggested in #1469