Update docstring and add tests
With the support for non utf-8 encodings, the lines argument in prepare_file() method can be a tuple or list of strings or bytes. This patch updates the docstring to describe the context of lines and adds tests for all combinations of the lines argument.
Depends on !100