escape separator character when building target directories