fix Python 2.4 support in uri validator when adding new media file