Implemented many helper methods to work with files, charsets and line endings.