Fixed check for duplicate extensions

Passing an array containing any of '.text', '.txt', '.html' or '.tmpl' value resulted as a duplicate extension registered, I fixed this.

I also used Array.isArray to check if the parameter is an array instead of stringifying the prototype, and if it is not, use all the arguments as an array.