Correct tests

Though the tests were running and passing they had a few problems.  The biggest one is that they were patching out the pip command and then manipulating the module directly (see 4ac83bc).  The other problems that were fixed surfaced locally depending on the testing environment.  Everything was good on Travis CI but you could get it to misbehave locally.  In any case, this PR cleans up a bunch of miscellaneous test stuff.