Fix broken file/image links resulting from change of permalinks.