VE-697: Media tool fixes in upstream merge

https://wikia-inc.atlassian.net/browse/VE-697

ping @kflorence