removing permalinks from files in dir