Slightly more robust input file extension check