Fix python.rake test_fn to deal with write to stderr