Fixing strange filename due to unexpected behavior of std::stringstream.

Thanks Manav Bhatia.