fix for when running under wine. also fix test_pretty_print bug