Fix bug in test by using a local file instead of HTTP URL. Also fix unclosed file in FileStream.getContentType(), remove dead code.