* Now accepts $force_regen option. * Calling tempfile_path() would cause an error. * Changed file_exists() for is_file().