escapes all forbidden characters from directory name