Detecting the existence of WordPress theme files (including child themes)

One can use a combination of locate_template and load_template to determine whether or not a theme provides certain files. This can be useful for plugins that want to be able to provide templates and provide a way for a theme to override them.