Add support file for test for format_file

This cannot be done with StringIO, as the function requires and actual
file path.
Modify format_file and do_replacements

Function now takes a string rather than a file path. Also add credits
and license.
Add tests for format_file
Add credits and license to create_titles.py