Don't run remote tests unless $TEST_REMOTE is set.

This makes it possible to complete a build on our servers, without having to
disable tests for this package.
Remove all the trailing whitespace.
PEP-8 fixes.

PEP-8 is a cruel mistress, so you should obey her fully.
Python 3 compatible.

Currently the `urllib` tests will fail with Python 3, as `csv.reader` now
enforces strings for input.  There are heaps of workarounds - and silly guessing
hacks like some HTTP libraries do - but nothing clearly obvious without piling
heaps of code in to support it.  For my use case it doesn't even matter, but it
should be fixed or the feature disabled…