migrateImagesToSwift: handle read-only wikis

Port #1949 to the upcoming release
Merge pull request #1950 from Wikia/release-195-swift-read-only

migrateImagesToSwift: handle read-only wikis