BF: Fix issue where unicode paths were not recognized as files.

Fixes issue where output files with unicode paths were always
being deleted if remove_unnecessary_outputs was set to True.