Added tests for mimetypes, file closures and writes.
Fix not implememted exception and fix required modes method.