* Ensure that test titles are strings before sanitizing them for screenshot names
* Fix linting errors
* stringify non-string title, return '' for null and undefined
* minor cleanup. extract to outer function. refactor to lodash.
Co-authored-by: Brian Mann <brian.mann86@gmail.com>