Fix for svg fonts. Fixes #60

This should fix issue #60. Now the file content is also used to determine the file type images and fonts.
I use this kind of code for caching and was not sure if threading might cause problems. I just wanted to be sure that there is no problem with concurrent threads.

```
@type ||= 
```