fix for preview on Windows (credits: PaulJBis): exportTo takes a File object, not a string