Just a quick update:

I got around this problem by calling webbrowser.open instead of the preview_file method:

webbrowser.open('file://' + urllib.quote(output_path))