fix bug when dir names contained ':'

now dirs can contain everything but '\n'