Do not check content-type twice in sendFile() method

The $contentType variable was being checked twice. I also added a test to make sure the content type is sent as expected.