Made rewrite rule case insensitive

...so that the script works with uppercase filename extensions.