Work around a Marionette bug with reusing the server port. Also clean up some PEP8 nits.