now smarter about filename extensions