Refactored my test runner vimscript.

I did this so that it was more modular as well as to simply clean things up.
Beyond that I corrected some edge case behavior that wasn't being handled
properly before.