Move tests to a gradle-friendly location
Add gradle wrapper
Add mime type support

Checks file extensions and peeks at the content to determine mime type.
MimeUtils can also be used as a standalone class.