Strip directory name