Made sure ob_flush is included in the flushing process..
Fixed a bug where names with non-filesystem-friendly characters failed to write. Basically remove all unnacceptable characters and THEN write the file with the clean name.