add extensions test
update extensions function to handle file which has doubled extension such as *.foo.bar