Added error handling for duplicate permalinks for media-files. Resolves issue #129