fix TypeError: endswith first arg must be str, unicode, or tuple, not list

when extensions is passed in as a list, the intention is clear but endswith
will not accept this.