Fix URL handling, move tests

If you don't like that the URL test points to my gist, someone from the matplotlib dev team can make a matplotlib gist to point to instead...