Fix bug in MIME-Type detection based on file extension

The regex used to parse the file extension included everything after the
first period character. This fails for example for minified versions of
files, which are usually named like this: jquery.min.js

In the above case the file would not be recognised as a javascript file.
This patch fixes the issue.