replacing hard-coded path separator in do_dirs