Improved file extension checking.

Updated logic to look for file extensions at the end of the URL, or just before the first question mark if one is present. This should prevent matching on subdomains or URL parameter values.
Merge pull request #24 from richmidwinter/master

Improved file extension checking.