Changed how Media model looks for records.

The constructor now chops off the extension from the requested filename and does a wildcard search in the database.
Fixes #96